我在安装 Maven 时遇到困难。
我已经按照这个设置了所有的环境变量:http://maven.apache.org/download.html
虽然我使用的是 Windows 7,但当我尝试运行命令 mvn --version
时,我得到,mvn 不被识别为内部或外部命令
等.
当我从 src\bin
中运行它时,我得到了错误:
Exception in thread "main" java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.launcher.Launcher
at java.net.URLClassLoader$1.run<URLClassLoader.java:202>
at java.security.AccessController.doPrivleged(Native Method)
...etc
然后:
Could not find the main class: org.codehaus.plexus.classworlds.launcher.Launcher.
最佳答案
检查您是否没有 M2_HOME 环境变量。
关于java - 设置 Maven 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6305795/