Monday, April 22, 2013

Fix Error: Unsupported major.minor version 51.0

Unsupported major.minor version 51.0
This is a error caused by the jdk you are using to run/debug your app (for both java apps and grails apps).
You should check the version of jdk you are using.

The version number shown describe which version of Java was used to compile the code.
The reported major numbers are:
J2SE 7 = 51,
J2SE 6.0 = 50,
J2SE 5.0 = 49,
JDK 1.4 = 48,
JDK 1.3 = 47,
JDK 1.2 = 46,
JDK 1.1 = 45
To fix the actual problem you should try to either run the Java code with newer version Java JRE or specify target parameter to the Java compiler to instruct the compiler to create code compatible with earlier Java versions.

So if you get error Unsupported major.minor version 51.0, you may can fix it by changing the jdk version to 1.7XXX.   

No comments:

Post a Comment