Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Netbeans 7.0.1 questions

 
Adrian Jakubas
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I type this out of Sams Teach Yourself Java 6 into netbeans 7.0.1

and I get this after build successful

Error: Main method not found in class volcanorobot.VolcanoRobot, please define the main method as:
public static void main(String[] args)
Java Result: 1
 
Kondwani Chipeta
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As the error message says, there is no method so the VM can not find an entry point to begin execution of your program. Try adding one and see what happens.
Remember a class can compile if it doesn't have a main method but execution requires a main method.
 
Kondwani Chipeta
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch Adrian.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic