Wednesday 3 February 2010

NetBeans not finding the main class

Oh man, this was an annoying problem. I suddenly got the error "Main class not found" from NetBeans even though everything was ok (the class was there, so was main(), project properties were correct etc). After some digging I found the simplest of solutions:
touch the main class file, i.e. change the date so that NetBeans detects it has been changed and recompile.


Whew. I was getting worried there for a moment.

No comments:

Post a Comment