Showing posts with label unsupported version 51.0. Show all posts
Showing posts with label unsupported version 51.0. Show all posts

Monday, September 8, 2014

Unsupported major.minor version 51.0

java.lang.UnsupportedClassVersionError happens because of a higher JDK during compile time and lower JDK during runtime.

51.0 in "Unsupported major.minor version 51.0" represents that, .class file generated with JDK 1.7 and but you are trying with run with(runtime) with lower version of it.

Below are the version numbers and compatible JDK's.

J2SE 8 = 52,
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 resolve this issue, make use of same version during the compile time and run-time.

Example: You would have generatd jar file with jdk 1.7 and but you are trying to run that jar using JDK 1.6 eclipse, this leads to above error.