This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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");
jQuery in Action, 3rd edition
subject: java.lang.NoSuchMethodError
It's not a secret anymore!