I am new to Java, but have some programming experience. I am reading a book on how to program in the Java language. My progress is impeded by my lack of knowledge with NetBe
This worked for me (Java 8 on Netbeans, June 2019): File > Project Properties > Run > Application Class > Browse > and try a different application class entry
I had the same problem and was able to fix it by setting the paths via cmd line:
cd C:\Program Files\Java\jdk*version*\bin>cd\
set path="C:\Program Files\Java\jdk*version*";
set classpath="C:\Program Files\Java\jdk*version*\lib\rt.jar";
Close netbeans and then delete this directory C:\Users\Your name here\AppData\Local\NetBeans\Cache
Start Netbeans again and let it read the project.
Test project. Run project. It should work fine.