How to run .jar file on unix?
java, unix
Solution
java.lang.UnsupportedVersionError
You must be trying to launch a jar compiled with JDK6, with a local java1.5.
You can either:
- upgrade your jvm on Unix to 1.6
- or re-compile your classes with a
:
javac -source 1.5 -target 1.5 -bootclasspath /path/to/jre1.5/lib/rt.jar
to check if you can generate 1.5 bytecode compatible.
Problem
I have generated .jar file in windows. I have to execute that .jar file in unix . I am running that command (`java -jar myJar.jar`), but it's giving ``` java.lang.UnsupportedVersionError ``` I am using java version 1.5.0.12 in Unix.