简体   繁体   中英

Gradle says my java installation is in the wrong place, despite it finds the correct folder

I'm not sure why, but whenver I run the command ./gradlew setDecompWorkspace , I get this error:

ERROR: JAVA_HOME is set to an invalid directory: C:\Program 
Files\Java\jdk1.8.0_191\bin

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

I've added the JAVA_HOME variable under my System Environment Variables as this: JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_191\\ , my system path contains this: C:\\Program Files\\Java\\jdk1.8.0_191\\bin;C:\\Program Files\\Java\\jdk1.8.0_191

Your JAVA_HOME is pointing to the Directory C:\\ProgramFiles\\Java\\jdk1.8.0_191\\bin

Change the JAVA_HOME to C:\\ProgramFiles\\Java\\jdk1.8.0_191 and include the
JAVA_HOME\\bin in your path.

JAVA_HOME=C:\\ProgramFiles\\Java\\jdk1.8.0_191 path= C:\\ProgramFiles\\Java\\jdk1.8.0_191\\bin;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM