I’ve run into the following error several times since upgrading past OS X 10.8 (both Mavericks 10.9 and Yosemite 10.10). I have the latest JRE installed at version 8.
The error occurs because the version of Java that Oracle ships doesn’t include the proper JVM capabilities definition. Specifically it ships with only CommandLine capability defined, though it supports the others (JNI, BundledApp, WebStart, and Applets).
Resolving it is rather simple once you know how.
- First open Terminal.
- Now change directory to the JRE or JDK you have installed (your path may be slightly different):
- Copy the “Info.plist” file to your desktop:
cp Info.plist ~/Desktop/Info.plist
- Edit the desktop copy of the file with TextEdit or your favorite text editor.
Around line 27, look for this stanza:
<key>JVMCapabilities</key> <array> <string>CommandLine</string> </array>
Change it to this:
<key>JVMCapabilities</key> <array> <string>JNI</string> <string>BundledApp</string> <string>WebStart</string> <string>Applets</string> <string>CommandLine</string> </array>
- Save the file.
- Back at Terminal, copy the desktop copy of the file back to the original location, but this time you need root authority so use sudo and enter your password when asked:
sudo cp ~/Desktop/Info.plist ./
- List the directory to ensure the copy succeeded. The timestamp should be current:
$ ls -al total 8 drwxrwxr-x 5 root wheel 170 Feb 27 21:14 . drwxr-xr-x 3 root wheel 102 Feb 27 21:14 .. drwxrwxr-x 16 root wheel 544 Feb 27 21:14 Home -rw-rw-r-- 1 root wheel 1773 Mar 3 20:09 Info.plist drwxrwxr-x 3 root wheel 102 Feb 27 21:14 MacOS
- Close Terminal
Now you should no longer be prompted to install the legacy Java 6 SE runtime when trying to launch Java apps.