I am trying to run the jar file on linux created from windows using jdk7 .
I am using the following command to run the
java -jar jarfile.jar
its running the jar and throwing the exception as un recognised class format version. because linux is showing the java version as 1.4.2 while i have extracted the jdk1.7 in the root directory but it is still taking the java version as 1.4.2 . what i have to do to run the jar file created using jdk1.7 . I have extracted the java (jdk1.7) on linux in root directory.
You need to specify the JDK 1.7 on your path e.g.
Note how you specify not just the path to the 1.7 installation, but the
binpathwithinthat.Typing
after you’ve changed the
PATHwill confirm if this has worked.