blog » Java/J2EE » java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher 问题的解决

java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher 问题的解决

从svn上checkout下CXF的源码,准备看看,结果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:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

放狗搜了一下,发现是因为环境变量中同时设置了M2_HOME和M3_HOME造成的,删除M2_HOME,即可成功构建。

[参考链接:https://blogs.oracle.com/sreekanth/entry/java_lang_noclassdeffounderror_org_codehaus]

This post has already been read 5191 times!

Related posts

RSS 2.0 | leave a response | trackback

发表评论