我正在尝试在我的Windows 8机器上安装maven。当我转到cmd并键入mvn时,终端给出了以下错误。
错误:JAVA_HOME设置为无效目录
JAVA_HOME = 注意:这是我的c盘上程序文件中jdk文件的位置。
请在您的环境中设置JAVA_HOME变量以匹配 Java安装的位置。
答案 0 :(得分:0)
由于文件路径错误,您可能也给了/ bin,您可以将JAVA_HOME设置为安装JDK的地方C:\ Programfiles \ Java \ jdk1.7
答案 1 :(得分:0)
问题是因为路径未设置更正。
Make sure that the directory "\apache-maven-x.x.x\bin" is on your command search path.
Make sure that the `JAVA_HOME` variable refers to the home directory for your Java installation. If you are executing Java from "c:\program files\jdk\bin", then the JAVA_HOME variable needs to point to "c:\program files\jdk".