• java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51


    http://blog.csdn.net/e_wsq/article/details/52100234

    一日换了一下MyEclipse,换成2016CI,结果从SVN上下载了一个工程后出现以下错误:

    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.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$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(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)

    提示错误是说使用的JDK版本不对,即现在使用的JDK版本不支持MavenCli要使用的版本,这里说明一下:

    major.minor version 51.0 对应的是JDK1.7
    major.minor version 50.0 对应的是JDK1.6

    这时看了一下新装的MyEclipse中配置的是这样的:

    处理如下:

     
     
  • 相关阅读:
    如何在linux系统中设置静态ip地址
    spring 学习
    java 反射机制和invoke方法
    CentoS7装机
    eclipse 添加jar包的方式
    No-args constructor for class does not exist. Register an InstanceCreator with G
    freemarker页面如何获取绝对路径basePath
    MySQL备份还原
    MySQL用户授权与权限
    CentOS7修改SSH远程连接端口
  • 原文地址:https://www.cnblogs.com/robbinluobo/p/6016206.html
Copyright © 2020-2023  润新知