MAVEN Runtime Exception Java.lang.UnsupportedClassVersionError solution

Source: Internet
Author: User

The MAVEN version I used is the latest version: 3.3.9, but I'm going to execute a simple clean command that will report the following error:

Exception in thread "main" java.lang.unsupportedclassversionerror:org/apache/maven/cli/mavencli:unsupported Major.minor version 51.0At 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 Java.net.URLClassLoader.defineClass (URLClassLoader.java:283) at java.net.urlclassloader.access$(urlclassloader.java:58) at java.net.urlclassloader$1.run (urlclassloader.java:197) at java.security.AccessController.doPrivileged (Native Method) at Java.net.URLClassLoader.findClass (Urlclasslo Ader.java:190) at Org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf (Classrealm.java:401) at Org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass (Selffirststrategy.java:42) at Org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass (Classrealm.java:271) at Org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (Classrealm.java:254) at Org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (Classrealm.java:239) at Org.codehaus.plexus.classworlds.launcher.Launcher.getMainClass (Launcher.java:144) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:266) at Org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229) at Org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415) at Org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356) at Org.codehaus.classworlds.Launcher.main (Launcher.java:47) at Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke (Nativemethodaccessorimpl.java:39) at Sun.reflect.DelegatingMethodAccessorImpl.invoke (Delegatingmethodaccessorimpl.java:25) at Java.lang.reflect.Method.invoke (Method.java:597) at Com.intellij.rt.execution.application.AppMain.main (Appmain.java:144)

To search the Internet, said the JDK version of the problem, and then went to the official website to see a bit, I understand!

The original MAVEN version of the JDK version is required, because the company's JDK is 1.6, so decisively under a 3.2.5 version, everything is normal.

Solution for MAVEN runtime exception Java.lang.UnsupportedClassVersionError

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.