This error is due to the default JVM (Java Virtual Machine: Java Virtual Machine) of your computer, trying to execute a class that was compiled in a version of the JDK (Java Development Kit: Java Development Kit) higher than the of the JVM (for example, trying to execute with the JVM 1.4 a class compiled in JDK 1.6).
If you want to check the version of the conflicting class, run the command javapthat is the decompiler that comes with the JDK, running it from %JAVA_HOME%\bin(it is recommended to do it from the most recent version of the JDK) .
For example, if you want to know what version of Java the class is compiled in MiClase.class, run the following commands:
javap -verbose MiClase.class | findstr "major"which would return something like:
major version: 50
javap -verbose MiClase.class | findstr "minor"which would return something like:
minor version: 0
Thus, the equivalences between the Java versions and their 'major version' are the following to date:
This is an easy way to do this check with the command javap, although there are more. If you know them, you are welcome to make your contribution as a comment to this answer.
This error is due to the default JVM (Java Virtual Machine: Java Virtual Machine) of your computer, trying to execute a class that was compiled in a version of the JDK (Java Development Kit: Java Development Kit) higher than the of the JVM (for example, trying to execute with the JVM 1.4 a class compiled in JDK 1.6).
If you want to check the version of the conflicting class, run the command
javap
that is the decompiler that comes with the JDK, running it from%JAVA_HOME%\bin
(it is recommended to do it from the most recent version of the JDK) .For example, if you want to know what version of Java the class is compiled in
MiClase.class
, run the following commands:javap -verbose MiClase.class | findstr "major"
which would return something like:javap -verbose MiClase.class | findstr "minor"
which would return something like:Thus, the equivalences between the Java versions and their 'major version' are the following to date:
( Listing Source )
This is an easy way to do this check with the command
javap
, although there are more. If you know them, you are welcome to make your contribution as a comment to this answer.You are running your program with a lower version than it was compiled with.
Example, you compiled with 1.8 and try to run on version 1.7