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