Sérgio Lopes Sakabatō, the reversed blog!

Fix Eclipse IDE & PyCharm not loading on OSX Mavericks23 Dec 2013

After a, somewhat, uneventful move from OS X Mountain Lion to Mavericks I hit an issue with Java based applications that would either refuse to start or ask me to install Java 6. Well, I don’t want to install Java 6, I have Java 7 running perfectly, but I would like to use some of the applications that are refusing to run. Searching the web didn’t provide any useful info besides many recommendations to just install the Apple provided Java 6 version.

So, on to the “fixing”, without installing the older and unmaintained version of Java…

Eclipse IDE and other Java based applications

This seems to be an issue caused by how Oracle sets Java to run on OS X, several options that announce the capabilities provided by the JRE are missing, making applications that need those capabilities fail to launch as they can’t find a usable JRE to run on.

We need to add the options JNI, BundledApp, WebStart and Applets to the list of JVMCapabilities that are listed in the /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Info.plist file.

  • Open the file /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Info.plist with a text editor (if your JDK version is different you need to adjust the path)
  • Search for a section, at the end of the file, like:
<key>JVMCapabilities</key>
<array>
	<string>CommandLine</string>
</array>
  • Replace it with:
<key>JVMCapabilities</key>
<array>
	<string>JNI</string>
	<string>BundledApp</string>
	<string>WebStart</string>
	<string>Applets</string>
	<string>CommandLine</string>
</array>
  • Logout and login again, your Java based applications will start running.

Fixing PyCharm

Well, not all, PyCharm won’t and will tell you nothing unless you try to open it using the terminal. If you do you’ll see the very useful (not) message “LSOpenURLsWithRole() failed with error -10810”. No idea of that this means, and JetBrain’s forums only say they know of the error and are working on a fix.

Combined with the change we did earlier to have Java applications run, the change we’ll make to PyCharm’s configuration file will make the IDE run as it should.

  • Use the Show Package Contents option in PyCharm bundle
  • Inside the Contents folder there is a Info.plist file, pen it and find the following text:
<key>JVMVersion</key>
<string>1.6*</string>
  • Change it to:
<key>JVMVersion<key>
<string>1.7*<string>
  • Run PyCharm, it will start without an issue.

UPDATE: Seems Android Studio suffers the same problem as PyCharm, so the fix is the same :)