This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes java.lang.NoSuchMethodError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java.lang.NoSuchMethodError" Watch "java.lang.NoSuchMethodError" New topic


Anthony Smith
Ranch Hand

Joined: Sep 10, 2001
Posts: 285
Exception in thread "main" java.lang.NoSuchMethodError: main
Engin Okucu
Ranch Hand

Joined: Feb 09, 2002
Posts: 174
This exce^tion is thrown because you don't have a correct method main() in your application,even if you don't have a method main you compile whithout problem but it will not guarantee you can run it :

public class abc {
public static void main(String args[]) {
System.out.println("now OK");
I agree. Here's the link:
subject: java.lang.NoSuchMethodError
Similar Threads
can we develop java application without main method in jdk1.7?
Help me for these questions from John Hunt's mock exam
Main Method