Java Versions#We compiled most of the programs with 1.5.0_11 and have tested most with 1.7.0.
- Many programs will NOT work with 1.4 or earlier.
- Very few will work with 1.3.
If you get an error similar to:
java.lang.UnsupportedClassVersionError: .... (Unsupported major.minor version 49.0)You will need to be sure you are using at least Java 1.5.
You can retrieve the JVM Version of java you are running by typing:
Java bytecode version represents the format used for the class files. The bytecode version allow JVMs to verify that the class file is loadable. Every JVM has a maximum version it can load, and JVMs will reject class files with later versions. The "java.lang.UnsupportedClassVersionError" is thrown when the JVM is attempting to load a class file format (bytecode version) that the JVM is unable to support.
We found a good list for checking byteCode Versions
The following table gives the bytecode versions that will run on a particular JVM version, as listed by Sun or determined by experiment.
|Bytecode Version||JVM Version||Source|
|45.0 - 45.3||1.0.2||Sun|
|45.0 - 45.65535||1.1.*||Sun|
|45.0 - 46.0||1.2||Sun; experiment suggests that some 1.2 JVMs also support 46.3|
|45.0 - 47.0||1.3||Experiment|
|45.0 - 48.0||1.4||Experiment|
|45.0 - 49.0||5 (1.5)||Experiment|
The system property "java.class.version" determines the Maximum version the JVM supports. The following table shows the "java.class.version" for each version of the JVM:
- 1.1 = <45.3>
- 1.2 = <46.0>
- 1.3 = <47.0>
- 1.4 = <48.0>
- 1.5 = <49.0>
- 1.6 = <50.0>
- 1.7 = <51.0>
- 1.8 = <52.0>
So if a class file has a bytecode format of 49.0 and it is attempted to run on a 1.4 JVM, you will get a error like:
java.lang.UnsupportedClassVersionError: .... (Unsupported major.minor version 49.0)Which implies that the JVM is not able to support a bytecode format of 49.0.