[英]How to set JAVA_HOME environment variable in Intelli J
I'm on windows and have set the environment JDK for the intelli J project to jdk 1.8 as well as the path for JAVA_HOME in the system variable setting to the jdk 1.8 path however when I try to use "gradle build" in the local terminal in intelli j it tells me 我在Windows上,将智能J项目的环境JDK设置为jdk 1.8,并将系统变量中JAVA_HOME的路径设置为jdk 1.8路径,但是当我尝试在本地终端中使用“ gradle build”时在intelli j中,它告诉我
"ERROR: JAVA_HOME is set to an invalid directory: C:\\Program Files\\Java\\jdk-10.0.2 “错误:JAVA_HOME设置为无效目录:C:\\ Program Files \\ Java \\ jdk-10.0.2
Please set the JAVA_HOME variable in your environment to match the location of your Java installation." 请在您的环境中设置JAVA_HOME变量以匹配Java安装的位置。“
When I buil the project in cmd prompt it works fine however I'd like to be able to do it in the local terminal. 当我在cmd提示符中构建项目时,它工作正常,但我希望能够在本地终端中执行此操作。 Is there a command to let me set the path for JAVA_HOME through the intelli j terminal?
是否有命令让我通过intelli j终端设置JAVA_HOME的路径?
You can find it out at Selecting-the-JDK-version-the-IDE-will-run-under 您可以在Choose-the-JDK-version-the-IDE-will-run-under中找到它
Try also to see the environment variables settings. 还可以尝试查看环境变量设置。 Go to windows environment variables -> under system variables, seek for the varaible "JAVA_HOME" -> see the value and edit if its wrong path
转到windows环境变量 - >在系统变量下,寻找变量“JAVA_HOME” - >查看值并编辑它的错误路径
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.