So I\'m making a java application in Neatbeans 7.4, been working at it for a while, everything was fine, running the project worked fine, but now when I hit run project, I g
If none of the above works (Setting Main class, Clean and Build, deleting the cache) and you have a Maven project, try:
mvn clean install
on the command line.
I have run into this error a couple of times as well and for me the above solutions did not work. What does seem to work is going to the Project Properties, and under Compiling toggling Compile on Save.
For more reference watch this video
Using NetBeans 8.1, I got the dread
Error: Could not find or load main class
from carelessly leaving an empty line in the Project Properties > Run > VM Options
field. Until you click in the field, you may not see the caret flashing out of place. Remove the empty line to restore equanimity.
I had the same problem and I moved the project to a location where the path had no none-english letter and that fixed the problem
Try to rename the package name and the class/jframe names... The clean and build the application.
Click on Refactor
Do the same for the class/jframe names.
That should do it!!! All best