|Title: How do I compile for compatibility with older versions of Java?
java.lang.UnsupportedClassVersionError: ABCPROG has been compiled by a more recent version of the Java Runtime (class file version 61.0),What can I do to resolve this?
How can I see the version number in the .class file?
-jo="-source 1.8 -target 1.8"To compile a program named MYPROG.cbl:
iscc -jo="-source 1.8" MYPROG.cbl(you can omit "-target 1.8" since it is the default when specifying "-source 1.8")
Run this command to get the supported releases for the -source option
javac --help -source
In order to check the version number in a .class file you can use the javap utility that is distributed with the JDK.
For example, the following command will report the version of a program named MYPROG.
javap -verbose MYPROG | grep majoror run
javap -verbose MYPROGand the version numbers will be reported in the first 5 lines.
Note that MYPROG.class must be in the class path.
You can specify a class path with "javap -cp".
The major version is mapped to the Java SE version here.
|Authored by: Veryant Support on Mon, Aug 31st, 2009 at 7:00 PM
This question has been viewed 81902 times so far.
|Online URL: http://support.veryant.com/support/phpkb/question.php?ID=57
Powered by PHPKB Knowledge Base Software