java.lang.UnsupportedClassVersionError

java-lang-unsupportedclassversionerror

Caused By: java.lang.UnsupportedClassVersionError:
If see below it means JDK version project built on and your JDK version doesn’t match
Caused By: java.lang.UnsupportedClassVersionError: com/controller/SpringMVCController : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)
Truncated. see log file for complete stacktrace

  • Right click project –> properties

java.lang.UnsupportedClassVersionError

  • Next window click Java Compiler –> Check project specific setting and choose version of JDK which is installed and available in eclipse. We have tested our code on JDK 1.7 version you could test on version 1.5 or above please select from drop down then click Apply and OK

java.lang.UnsupportedClassVersionError

  • This should fix unsupported version issue and you should be OK now.

Leave a Reply

Your email address will not be published. Required fields are marked *