File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Exception Question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Exception Question" Watch "Exception Question" New topic
Author

Exception Question

Linze marin
Greenhorn

Joined: Jul 23, 2004
Posts: 12
I have rec'd the following run time error msg.

Can anyone please give me some insight as to what it means?

Thanks


Exception in thread "main" java.lang.NoSuchMethodError: main
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24040
    
  13

It means that the class you specified at the command line was found, but doesn't contain a method with the signature

public static void main(String[] args)

Check your code, make needed changes, and recompile. Every aspect of this line (except the name "args", which is arbitary, and the qualified "public" which some Java implementations don't care about) is necessary, and changing any of them would lead to the error message you described.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Exception Question
 
Similar Threads
Exception in thread "main" java.sql.SQLException
Main Method
Connection to remote DB server to run JDBC application program
OCPJP 6 Practice exams, exam 2 q 29 error
java.lang.NoSuchMethodError