• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.NoSuchMethodError

 
Anthony Smith
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exception in thread "main" java.lang.NoSuchMethodError: main
 
Engin Okucu
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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");
}
}
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic