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:
Manifest-Version: 1.0 Class-Path: . Main-Class: Main
His Java version is 18.104.22.168 . 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