码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2015-07-10 09:34:00      阅读:294      评论:0      收藏:0      [点我收藏+]

标签:maven   exception   apache   异常   

安装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.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
1)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(Cl
assRealm.java:401)
        at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(
SelfFirstStrategy.java:42)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadCl
ass(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(Launch
er.java:144)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:266)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)


出现如上异常 : 因为之前jdk的版本是 1.6  maven 版本是 3.3   因为maven 3.3 jdk必须是 jdk7 所以从重装jdk 即可 


版权声明:本文为博主原创文章,未经博主允许不得转载。

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

标签:maven   exception   apache   异常   

原文地址:http://blog.csdn.net/itlqi/article/details/46822379

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!