How to set up Idea under MacOs

已回答

I downloaded Idea EAP 2017.3 Ultimate for Mac OS, with a bundled jre.

Once I cloned my gradle project, I tried to sync but it was complaining that there was no project SDK.

I tried to add the bundled jre under /Applications/IntelliJ IDEA.app/Contents/jdk/Contents/Home but it always complained it wasnt a valid JDK home.

So I downloaded the jre 9 and installed. Added that as Project SDK, now I get this:

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=/Applications/IntelliJ IDEA.app/Contents/jdk/Contents/Home,daemonRegistryDir=/Users/loredanasoetta/.gradle/daemon,pid=421,idleTimeout=null,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=IT,-Duser.language=en,-Duser.variant] Actual: DefaultDaemonContext[uid=d56a6606-9df7-4dbb-b269-96531b5ba6f9,javaHome=/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home,daemonRegistryDir=/Users/loredanasoetta/.gradle/daemon,pid=481,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=IT,-Duser.language=en,-Duser.variant]

1) Why the bundled jre doesn't get accepted?

2) I saw some people solved by explicitly declaring the jdk path in gradle-wrapper.properties org.gradle.java.home=/Library... but this is crap because it'd be pushed on the repo and it's valid only for me Which is the right way to do have Idea on Mac OS?

0

1. We bundle runtime that is not a complete JDK, you need to have normal JDK installed for development, see https://youtrack.jetbrains.com/v2/issue/IDEA-184243.

2. Configure JDK used to run Gradle in IntelliJ IDEA: 

0

请先登录再写评论。