I have no problem with:
org.gradle.java.home=C:/Program Files/Java/openjdk1.8.0_202
in my (global) gradle.properties file. Also, no problem without it (with nothing set). But if replace it with one of below configurations (all paths are valid):
org.gradle.java.home=C:/Program Files/Java/openjdk-9.0.4org.gradle.java.home=C:/Program Files/Java/openjdk-10.0.1org.gradle.java.home=C:/Program Files/Java/openjdk-11.0.1org.gradle.java.home=C:\\Program Files\\Java\\oraclejdk-11.0.1
then I will get an error message (same for each) after I save the file and import Gradle changes in IntelliJ IDEA:
Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at https://docs.gradle.org/5.0/userguide/gradle_daemon.html
Please read the following process output to find out more:
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0 Error: Could not find or load main class java.base.java.lang=ALL-UNNAMED Caused by: java.lang.ClassNotFoundException: java.base.java.lang=ALL-UNNAMED
The note is the issue is only for IDE Gradle sync. Gradle tasks themselves work correctly (independent from IDE)! Even when I run gradle --status (see here about it) can see everything is OK and daemon is running using JDK 11:
>gradlew --status
PID STATUS INFO
10668 IDLE 5.0
And the path of PID: 10668:
>wmic process where "processId=10668" get Name, ProcessID, ExecutablePath
ExecutablePath Name ProcessId
C:\Program Files\Java\openjdk-11.0.1\bin\java.exe java.exe 10668

