Java - Resolve "Could not find the main class program will exit"

by
Jeremy Canfield |
Updated: October 02 2023
| Java articles
This error appears when attempting to run a Java program.
This error may appear if the version of Java on the client PC is not compatible with the version of Java being used by the Java program. For example, let's say the Java program was created to use version 1.8 of the Java Runtime Environment (JRE).
If attempting to use version 6 or version 7 of the Java program on the client PC, the error appear appear. In this example, the program should run properly when version 8 of Java is being used on the client PC.
Did you find this article helpful?
If so, consider buying me a coffee over at