Mvn – v error: Unsupported major minor version 51.0
Error reason: Maven version and JDK version do not match
java.lang.UnsupportedClassVersionError: org/apache/lucene/store/Directory : Unsupported major.minor version 51.0
Could not find the main class: org.codehaus.plexus.classworlds.launcher.Launcher. Program will exit.
Solution:
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
From the above correspondence can be seen from the jdk7 version error; because the maven version and jdk version is not compatible, I use the maven is 3.3.9, jdk is 1.6.0, and then replaced a jdk1.8.0 version will be able to; specific cmd use echo %JAVA_HOME% command to check their environment variables configured in the version;
Sometimes you will see version 1.8.0 with the java -version command, but you may see a different version of jdk with the echo %JAVA_HOME% command;
This phenomenon is mainly due to a bad personal habit of configuring multiple versions of jdk in environment variables and introducing only one of them in the path, which actually has disadvantages, for example, Tomcat will read the information in environment variables named JAVA_HOME by default, but not JAVA_HOME2;
So it is better to name the environment variable JAVA_HOME, and not to configure more than one jdk;
Read More:
- [Solved] Linux java -jar Start Project Error: Unsupported major.minor version 52.0
- [Solved] Error installing MVN: Java_Home is set to an invalid directory
- [Solved] IDEA mvn Error: GC overhead limit exceeded
- [Solved] MVN Build Project Error: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test
- MVN compile Error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin…
- Spring Security Upgrade to Version 5.5.7, 5.6.4 or Above to Startup Error (Version incompatibility)
- Idea create Maven project Error: [error] no longer supports source option 1.5. Please use version 1.6 or higher, and the idea reports an error: error: Java does not support the error of release version 5
- [Solved] java.sql.SQLException: Unsupported character encoding ‘utf-8
- [Solved] Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of
- IDEA pom.xml dependency version error [How to Solve]
- How to Solve Java Runtime (class file version 53.0)ERROR
- How to Solve EasyExcel3.0.5 Version Error
- ERROR launching ‘JD-GUI‘ No suitable Java version [How to Solve]
- IDEA-Error java error release version 5 not supported (How To Fix)
- Springboot2.6X version integrate knife4j error [How to Solve]
- [Solved] Error: Node Sass version 6.0.1 is incompatible with ^4.0.0.
- Mongodb java version 3.X, prompt “XXX (an encryption algorithm) is not available” when there is a user name and password
- serviceimpl inherits generic public impl startup error: ClassCastException (Mybatis-plus version Issue)
- [Solved] ‘build.plugins.plugin.version‘ for org.springframework.boot:spring-boot-maven-plugin is missing.
- How to Solve JD-GUI Start Error (Mac ARM Version)