在VM上尝试mvn但是收到ClassNotFound错误

时间:2014-10-17 05:50:31

标签: java maven

JDK和maven安装在系统上。我的java版本是" 1.6.0_33"。在检查我的mvn版本时,我收到此错误:

    Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher
    Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.launcher.Launcher
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: org.codehaus.plexus.classworlds.launcher.Launcher.  Program will exit.

路径:

JAVA_HOME=/apps/jdk  
M2_HOME=/apps/maven  
PATH = /usr/kerberos/sbin:/usr/java/j2se/bin:/usr/share/ant/bin:/u01/app/oracle/product/11.2.0/xe/bin:/apps/jre1.7.0_11/bin:/apps/jdk/bin:/u01/app/oracle/product/11.2.0/xe/bin:/apps/jdk/bin:/apps/maven/bin:/usr/NX/bin:/usr/kerberos/bin:/usr/java/j2se/bin:/usr/share/ant/bin:/usr/local/java/jdk1.6.0_20/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/java/jdk1.6.0_20/bin

我迷路了。怎么解决?

0 个答案:

没有答案