java.lang.NoSuchMethodError: main

Dear all,

I am developing an application but I get the next error.

Does anybody know this error?

java.lang.NoSuchMethodError: main

Exception in thread "main"

<CODE>

import javax.swing.*;

import java.awt.*;

import java.awt.event.*;

import javax.microedition.io.*;

import java.io.*;

import javax.bluetooth.*;

import javax.obex.*;

public class FileServer extends ServerRequestHandler

implements ActionListener{

public void actionPerformed(ActionEvent e) {

JButton startButton = new JButton("Start Server");

startButton.setEnabled(false);

try {

UUID uuid = new UUID("8841", true);

String url = "btgoep://localhost:" + uuid

+ ";name=FTP;authenticate=false;master=false;encrypt=false";

SessionNotifier sn = (SessionNotifier)Connector.open(url);

System.out.println("[server:] Now waiting for a client to connect");

sn.acceptAndOpen(this);

System.out.println("[server:] A client is now connected");

} catch (Exception ex){

}

}

public int onConnect(HeaderSet request, HeaderSet reply) {

System.out.println("[server:] The client has created an OBEX session");

return ResponseCodes.OBEX_HTTP_OK;

}

public void onDisconnect (HeaderSet req, HeaderSet resp) {

System.out.println("[server:] The client has disconnected the OBEX session");

}

public int onPut (Operation op) {

try {

java.io.InputStream is = op.openInputStream();

System.out.println("Got data bytes " + is.available() + " name "

+ op.getReceivedHeaders().getHeader(HeaderSet.NAME) +

" type " + op.getType());

File f =

new File((String)op.getReceivedHeaders().getHeader(HeaderSet.NAME));

FileOutputStream fos = new FileOutputStream (f);

byte b[] = new byte[1000];

int len;

while (is.available() > 0 && (len = is.read(b)) > 0) {

fos.write (b, 0, len);

}

fos.close();

System.out.println("[server:] Wrote data to " + f.getAbsolutePath());

} catch (Exception e) {

e.printStackTrace();

}

return ResponseCodes.OBEX_HTTP_OK;

}

}

</CODE>

[2281 byte] By [KoTurka] at [2007-11-26 21:18:30]
# 1
Check this out, especially towards the bottom half of the page. http://java.sun.com/docs/books/tutorial/getStarted/application/index.htmlYou need a main method if you want to use this class as the application entry point.
atmguya at 2007-7-10 2:57:29 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...