[英]java.exe is not recognized as an internal or external command operable program or batch file when java is added to path
I am trying to input "build clean build deploy" on the command line but I'm getting the following error : java.exe is not recognized as an internal or external command operable program or batch file 我试图在命令行上输入“ build clean build deploy”,但出现以下错误:java.exe无法识别为内部或外部命令可操作程序或批处理文件
I have added Java and Ant to my path, the command "Java -version" produces the version number so I know it has been correctly added to path. 我已经在路径中添加了Java和Ant,命令“ Java -version”产生了版本号,因此我知道它已正确添加到路径中。 What is causing my error?
是什么导致我的错误?
You need to set JAVA_HOME and PATH in your environment variables. 您需要在环境变量中设置JAVA_HOME和PATH。 Make sure that the directory of your Java does not contain the space.
确保Java目录中不包含空格。 In your Path, the url should be %JAVA_HOME%\\bin.
在您的路径中,URL应为%JAVA_HOME%\\ bin。 After setting them, open a new commander and check again.
设置完后,打开一个新的指挥官并再次检查。
Hope this help. 希望能有所帮助。
In JAVA_HOME set path of JDK as shown below: 在JAVA_HOME中设置JDK的路径,如下所示:
C:\\Program Files\\Java\\jdk1.8.0_91 C:\\ Program Files \\ Java \\ jdk1.8.0_91
In Path, set path of bin directoryAs shown below: 在“路径”中,设置bin目录的路径,如下图:
C:\\Program Files\\Java\\jdk1.8.0_91\\bin C:\\ Program Files \\ Java \\ jdk1.8.0_91 \\ bin
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.