Windows 7 无法将 mvn 识别为命令。
环境变量:
M2_HOME: D:\apache-maven-3.0.4
M2: %M2_HOME%\bin
PATH: . . . :M2_HOME;M2; . . .
在命令提示符下,输入“echo %M2_HOME%”和“echo %M2%”给出:
D:\apache-maven-3.0.4 and D:\apache-maven-3.0.4\bin
输入 "%M2%\mvn --version" 给出:
Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
Maven Home: D:\apache-maven-3.0.4
Java Version: 1.7.0_03, vendor: Oracle Corporation
Java Home: D:\Glassfish3\jdk7\jre
and so on.
只需输入 mvn --version" 产生:
mvn is not recognized as an internal or external command,
operable program or file.
我已重新启动 Windows 7 无济于事。我不知道这里发生了什么。有什么建议么?