I have a jar file that I created on my PC using Java 7. I want to run it on my lab server which only has Java 6. I try to run the jar file: java -jar file.jar
but there was a UnsupportedClassVersionError exception.
Since I have no root right, I cannot install the new Java 7 on the server. However, I can download JDK7 to my working folder (let say /home/jdk7
)
Is there a way to run the jar file by specifying the jdk path to /home/jdk7 ? Thanks.