我严格按照 Maven 教程的要求做,但仍然无法在 Windows 上安装 Maven。
当我在命令提示符中运行以下命令时:
E:\Documents and Settings\zach>mvn --version
我得到了:
'mvn' is not recognized as an internal or external command, operable program or batch file.
我导航到 maven 安装文件夹并运行 mvn --version
得到:
E:\java resources\apache-maven-2.2.0\bin>mvn --version
ERROR: JAVA_HOME is set to an invalid directory.
JAVA_HOME = "E:\Sun\SDK\jdk\bin"
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation
但当我运行 java -version
时,我得到:
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode)
所以我安装了 Java,有人知道问题出在哪吗?