Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0

me 的 maven 项目, 右键 update dependencies , 出现 错误

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    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)

原来是 当前项目的对应的 jre 版本太低了, 改为 1.7 就ok了!

时间: 2024-10-07 20:23:13

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0的相关文章

【原创】Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0

有多个情况造成这种异常,以下列举 1.JDK 和 MAVEN 版本不兼容 从apache 官网下载maven bin 版本,我下的是apache-maven-3.3.3-bin.zip. 下载下来的安装包解压到你的工作目录下.如:E:\开发\apache-maven-3.3.3,配置环境变量,MAVEN_HOME,再把%MAVEN_HOME%\bin配置到 path中. 安装java jdk,配置JAVA_HOME.打开cmd ,输入mvn -r,如果会报错.java.lang.Unsuppor

MyEclipse配置tomcat报错 - java.lang.UnsupportedClassVersionError: org/apache/lucene/store/Directory : Unsupported major.minor version 51.0

1 开发Servlet程序时,MyEclipse配置好tomcat与JDK之后,启动时控制台报下列错误: 1 java.lang.UnsupportedClassVersionError: org/apache/lucene/store/Directory : Unsupported major.minor version 51.02 at java.lang.ClassLoader.defineClass1(Native Method)3 at java.lang.ClassLoader.de

java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0解决办法

androidstudio编译程序时出现java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0.Unsupported major.minor version 52.这个错误是由于(jdk)高版本的java project使用了低版本的来运行.使用命令(java -version 和 javac -version)查看java

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/ma ven/cli/Maven

安装maven 中出现如下异常: Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/ma ven/cli/MavenCli : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCo

Exception in thread "main" java.lang.UnsupportedClassVersionError:Unsupported major.minor version 52

报错: Exception in thread "main" java.lang.UnsupportedClassVersionError: com/fsc/mina/client/TransportService : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoa

java.lang.UnsupportedClassVersionError: com/mysql/cj/jdbc/Driver : Unsupported major.minor version 5

原因: com/mysql/cj/jdbc/Driver是6.0版本的驱动,兼容JDK8环境,不兼容JDK7环境,在基于jdk7的tomcat中编译运行会出错,在基于jdk8的tomcat中编译运行则不会出错. 解决方案: 1.jdk7+老版5.0驱动com/mysql/jdbc/Driver 2.jdk8+新版6.0驱动com/mysql/cj/jdbc/Driver 原文地址:https://www.cnblogs.com/GH0522/p/9328416.html

java.lang.UnsupportedClassVersionError: xxx/xxxClass : Unsupported major.minor version 51.0

完全参考自 http://www.cnblogs.com/xing901022/p/4172410.html 这种错误的全部报错信息: 1 java.lang.UnsupportedClassVersionError: org/apache/lucene/store/Directory : Unsupported major.minor version 51.0 2 at java.lang.ClassLoader.defineClass1(Native Method) 3 at java.la

Tomcat - java.lang.UnsupportedClassVersionError:Unsupported major.minor version 51.0 (unable to load class com.microsoft.sqlserver.jdbc.SQLS

今天使用Tomcat连接sql Server 2008 enterprise的时候,报错: HTTP Status 500 - Servlet execution threw an exception type Exception report message Servlet execution threw an exception description The server encountered an internal error that prevented it from fulfil

Ubuntu Crontab Java版本不符的问题解决Unsupported major.minor version 51.0

因为Lucene4.9要求Java版本最低为Java7,所以之前一直用的Java6要升级了,要不然会报如下错误: Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/solr/client/solrj/SolrServerException : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineCl