"Could not find the main class: main. program will exit" - Wierd case.
I finished a game in Java. I used Eclipse to program it.
I wrapped the game in an EXE file, using Launch4j.
The game runs perfectly fine on my computer, both by double-clicking the EXE, and by double clicking the JAR (and also by doing the same two things from the command line).
I sent the EXE file to a friend, packed in a RAR. (We both use Windows).
He tried to launch it from inside the RAR, and got this error:
"Could not find the main class: Main. program will exit"
Same error when extracting the EXE to the desktop and launching from there.
I checked in my MANIFEST file inside the JAR. It seems fine:
His Java version is 126.96.36.199 . Not so old, is it?
He offered to update Java on his computer to 1.7. He did and now it works.
Why would this error would appear when the version is older than 1.7?
I think that 1.6 isn't that old, is it? And if it is, still - why this particular error?
Could this be something wrong with my coding? Or something else?
Thanks a lot
Re: "Could not find the main class: main. program will exit" - Wierd case.
Java 1.6 is not able to execute classes created with java 1.7
The error message would be: Unsupported major.minor version 51.0