Mac OS X Platform Install FAQ

See JDK 7 and JRE 7 Installation Guide for general information about installing JDK 7 and JRE 7.


Q: Should I install the JRE or the JDK?

A: If you plan to run Java applications, install the Java Runtime Environment (JRE). The JRE is also referred to as Oracle Java. Once you have installed the JRE, you can launch Java applets and applications by double-clicking JAR files, JNLP files, and via the browser. Note that 32-bit browsers, such as Firefox in 32-bit mode, and Chrome, are not supported by the JRE.

If you plan to write Java applications, install the Java Development Kit (JDK).

Q: How do I install JavaFX?

A: The JavaFX SDK and Runtime are included in the installation of the JDK and JRE respectively, and they are integrated into the same directory structure. For information on how to work with JavaFX, see the JavaFX Documentation.

Q: How do I find out which version of Java is the system default?

A: If you have not yet installed Apple's Java Mac OS X 2012-006 update, then you are still using a version of Apple Java 6 that includes the plug-in and the Java Preferences app. See Note for Users of Macs that Include Apple Java 6 Plug-in.

When you launch a Java application by clicking a JNLP file, or through the browser, it uses the installed JRE. Only one JRE can be installed. For more information, see Determining the Installed Version of the JRE.

When you run Java application from the command line, it uses the default JDK. If you do not develop Java applications, you do not need to worry about this. For more information, see Determining the Default Version of the JDK.

Q: How do I clear the Java cache?

From System Preferences, launch the Java Control Panel by clicking the Java icon in the Other section.

From the Java Control Panel, click Settings... in the Temporary Internet Files section of the General tab.

In the Temporary Files Settings window, click Delete Files....

From the Delete Files and Applications dialog, select Cached Applications and Applets and click OK to clear those files from the cache.

To clear the applet and Web Start cache from a Terminal window, use the following command:

    % rm -rf ~/Library/Application\ Support/Oracle/Java/Deployment/cache

Q: How are Java updates managed on the Mac?

A: Every time you launch a Java applet or a Java Web Start application, the system first launches your program and then, in the background (so that performance of your Java application is not impacted), it determines if it has checked in the last 7 days for a Java update.

If an update is available, a Software Update window appears.

Selecting Install Update brings up a Downloading update progress bar.

After the download has completed, a window pops up, asking if you want to install and relaunch. You might want to finish your work before clicking Install and Relaunch.

At the end of the installation process, the installer notifies you if Java content is disabled in web browsers, and provides instructions for enabling it. If you previously chose to hide some of the security prompts for applets and Java Web Start applications, the installer provides an option for restoring the prompts. After the update is installed, the application is relaunched. If viewing an applet, the browser is relaunched.

Note that, if the application or applet does not automatically relaunch, be sure to manually relaunch so you can take advantage of the latest JRE.

If you choose Skip This Version, but later decide to check for an update, you can launch the Java Control Panel by clicking the Java icon in System Preferences. Go to the Update tab to initiate an update check.

If you choose Remind Me Later, you will be reminded of the update the next time you run Java.

Q: How do I uninstall Java?

A: Depending on your installation, see the related link:

Q: I have installed Java for OS X 2012-006 and Apple Java 6 can no longer be used for applets or Web Start. How do I get it back?

A: The Java for OS X 2012-006 update from Apple uninstalls the Apple-provided Java applet plug-in from all web browsers. You can download the latest version of Java from Oracle, which has improved security, reliability and compatibility.

If you prefer to continue using Apple's Java 6 plug-in, you can follow the steps provided in How to re-enable the Apple-provided Java SE 6 applet plug-in and Web Start functionality.

Q: After installing Java for OS X 2012-006, can I continue to use Apple's Java 6 alongside the OS X JDK or JRE for Java 7?

A: If you want to continue to develop with Java 6 in a Terminal window you can modify the startup script for your favorite command environment. For bash, use this:

export JAVA_HOME=`/usr/libexec/java_home -v 1.6`

Some applications use /usr/bin/java to invoke Java. After installing Java for OS X 2012-006, /usr/bin/java will find the newest JDK installed, and will use that for all of the Java related command line tools in /usr/bin. You may need to modify those applications to find Java 6, or contact the developer for a newer version of the application.

Q: Where can I find more information about Oracle Java for the Mac?

A: You may find the following information useful:

Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.