IntelliJ 11 on Mountain Lion

Has anyone been able to get IntelliJ to run on Mountain Lion? All I get is this in /var/log/system.log:

Jul 26 11:04:47 Michaels-MacBook-Pro com.apple.launchd.peruser.501[226] ([0x0-0x51051].com.jetbrains.intellij[1481]): Exited with code: 1

I think it might have something to do with Mountain Lion dropping support for ~/.MacOSX/environment.plist where I was setting JAVA_HOME.

I have tried adding a LSEnvironment dict in Info.plist for IntelliJ to set JAVA_HOME but I still get the above log entry.

0
2 comments

The answer seems to be to use /etc/launchd.conf. Put this in there (doesn't exist by default, you have to create the file). You have to reboot to have this take effect. This adds these env variables for both terminal and the GUI environment. I was able to start IntelliJ after adding this to launchd.conf and rebooting. I am unsure if JDK_HOME is still necessary for IntelliJ to work, I think years ago it was so I just still have it around just in case.

setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
setenv JDK_HOME /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home

0

After upgrading to ML I also had to install the JDK manually from here: http://support.apple.com/kb/DL1515

ML seems to only come with a JRE which is Java 1.6 Update 27 which /usr/bin/java links to by default. After installing the JDK I changed /usr/bin/java to point at the JDK (not really necessary I suppose)

lrwxr-xr-x  1 root  wheel  77 Jul 26 11:30 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Commands/java

0

Please sign in to leave a comment.