错误:java:无法运行程序CreateProcess错误= 2,系统找不到指定的文件 [英] Error:java: Cannot run program CreateProcess error=2, The system cannot find the file specified
问题描述
Error:java: Cannot run program "C:/Program Files/Java/jdk1.7.0_45/bin/java" (in directory "C:\Users\navya.chamidisetty\.IntelliJIdea2017.3\system\compile-server"):
CreateProcess error=2,
The system cannot find the file specified
我最近开始使用IntelliJ 17.当我在文件夹和C:\中签出所有代码并将其加载到Intellij中时.现在,当我尝试构建时,出现上述错误.有人可以帮我解决这个问题.
I have started using IntelliJ 17 recently. When I checkout all my code in a folder and C:\ and loaded in Intellij. Now when I try to build, I am getting the above mentioned error. Could someone please help me how to solve this.
我的%JAVA_HOME% = C:\Program Files\Java\jdk1.8.0_151
环境变量中的Path变量的值= C:\Program Files\Apache Software Foundation\apache-maven-3.0.3\bin;C:\newcorpweb\cxf\bin
Value of Path variable in Environment variables = C:\Program Files\Apache Software Foundation\apache-maven-3.0.3\bin;C:\newcorpweb\cxf\bin
系统变量中路径变量的值= C:\Program Files\Java\jdk1.8.0_151\
Value of Path variable in System variable = C:\Program Files\Java\jdk1.8.0_151\
推荐答案
IDEA不必使用JAVA_HOME
变量.在项目设置中设置项目SDK(在您的情况下为JDK):文件->项目结构,在项目SDK中设置正确的路径.
IDEA doesn't necessary use JAVA_HOME
variable. The project SDK (JDK in your case) is setup in the project settings: File -> Project Structure, Project SDK and set up the proper path there.
这篇关于错误:java:无法运行程序CreateProcess错误= 2,系统找不到指定的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!