Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ Gradle Plugin: The supplied javaHome seems to be invalid

Similar to:
- Intellij 14 the supplied javaHome seems to be invalid
- Android Studio - supplied javaHome is not a valid folder

However, I am trying to use my JAVA_HOME variable which is set to C:\Program Files\Java\jdk1.8.0_40

I do not understand why intellij is looking for the JDK inside of its install directory.

In intellij:

Executing external task 'bootRun'... The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1\jre\bin\java.exe External task execution finished 'bootRun'. 

C:\>java -version java version "1.8.0_40" Java(TM) SE Runtime Environment (build 1.8.0_40-b25) Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode) 

C:>env ... JAVA_HOME=C:\Program Files\Java\jdk1.8.0_40 ... 
like image 916
Eric Francis Avatar asked Mar 30 '15 21:03

Eric Francis


1 Answers

In my case the answers above didn't work. Here's what work for me: I needed to change Gradle JVM to point to the actual JDK: Image showing IntelliJ Settings window

like image 57
humazed Avatar answered Sep 22 '22 15:09

humazed