aspose file tools*
The moose likes Beginning Java and the fly likes exception error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "exception error" Watch "exception error" New topic
Author

exception error

chelle agno
Greenhorn

Joined: May 07, 2003
Posts: 1
i was compiling my project and it did compile but when i', excute it says exceptionerror thread in main what this really mean? thanks
rom chatterjee
Ranch Hand

Joined: Dec 11, 2001
Posts: 46
Please post the whole error message


Rom Chatterjee<BR>Sun Certified Java Programmer
Dorothy Finkel-Laverty
Ranch Hand

Joined: Nov 24, 2001
Posts: 51
I'd bet it says "Exception in thread main java.lang.NoSuchMethodError: main". What it means is that your program did not have a main method with the proper signature - like "public static void main(String [ ] args)".
You want to learn to read these exceptions - they really point you to the solution. For example, when you run a console application, it MUST have a main method. That is the starting point for execution. If it does not have a main method that matches the signature (is named main and takes an array of Strings as the input argument), and even does not return nothing (void), it won't know where to start. The next part, "java.lang.NoSuchMethodError" tells you that the problem is in the java.lang package, and it couldn't find the method main (see it after the colon?).
Hope this helps.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: exception error