Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception Question

 
Linze marin
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic