MacOS – Java 7 JRE Not Detected on Clean Install of Mountain Lion

javamacos

I know there similar questions on how to enable the Java 7 JRE on Mountain Lion when Apple's Java 6 JRE is installed as well.

But I just did a clean install of Mountain Lion, installed Java 7 JRE – not Java 7 JDK – and it is not being detected.

I see the Java icon in System Preferences. But Java applications are still prompting for a Java 6 installation from Mountain Lion. And running "java -version" from the command line also does the same.

Oracle's instructions seem to say that I do not need to do anything further then simply installing the JRE. And online tutorials I read also suggest the same.

Does anyone have an idea why this is?

Best Answer

In Oracle's JRE 7 for Mac installation instructions, it states:

Installing a JRE from Oracle will not:

  • Update java -version symlinks or add java to your path.

  • Show the installed JRE in the Java Preferences.app

To be able to do the above, you need to install the JDK.

After installing the JDK, go to Applications > Utilities > Java Preferences.app and drag Java SE 7 to the top to indicate that it is preferred. You may also switch off Java SE 6 entirely without uninstalling it.