我遵循了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。有人知道是什么问题吗?