Exporting a Runnable JAR file from Eclipse is by far the quickest way to launch an Eclipse project from command line on another machine. See this answer.
A problem is that if the JRE installed on the machine you want to run from is older than the JDK used by Eclipse, you get this error:
java.lang.UnsupportedClassVersionError: test_hello_world : Unsupported major.minor version 51.0
I know that on Eclipse I can build the project with a lower compliance level (e.g., 1.6
instead of 1.7
), but this does not seem to affect an exported JAR file.
Any idea on how to export a Runnable JAR file to be executed on an older JRE?
This procedure seems to work for me (I tested with Java 1.2 and Eclipse Juno):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With