hi guys, I googled this issue, but didnt get a clear answer. when I try to open a trunk enlistment as a gradle project in intellij, i get the error:
The newly created daemon process has a different context than expected. It won't be possible to reconnect to this daemon. Context mismatch: Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=C:\Program Files\Java\jdk1.8.0_91,daemonRegistryDir=C:\Users\bimber\.gradle\daemon,pid=7312,idleTimeout=null,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=492e8230-6b41-441d-bc54-fe2bb37f7249,javaHome=C:\Program Files\Java\jdk1.8.0_91\jre,daemonRegistryDir=C:\Users\bimber\.gradle\daemon,pid=10400,idleTimeout=60000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]
So for some reason intellij or gradle are trying to tack on 'jre' to JAVA_HOME. Has anyone seen this before? JAVA_HOME is set correctly at the OS level for me user, and also in Intellij's Path Variables Settings. I dont see anything in ~/.gradle/ that is specifying something different either.
Thanks for any help. |
|
Susan Hert responded: |
2017-04-26 13:15 |
I've not seen this error, but you might want to check the Gradle configuration within IntelliJ (Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle) and make sure the Gradle JVM on this page is pointing to the JDK and not the JRE. |
|
Ben Bimber responded: |
2017-04-27 14:01 |
In case others hit this, I think I figured it out. I noticed my PATH was preferentially selecting the jre's java.exe. Even though I have JAVA_HOME set to the correct JDK directory, I'm hypothesizing that some script is trying to infer java_home based on the location of java.exe (some wrapper scripts do this). when i updated my PATH to preferentially use the JDK's java.exe, then tried to open this in intellij, things work properly. |
|
|
|