Macs do not include Java by default so you have to download and install Java on El Capitan, Sierra and High Sierra separately. One of the most common problems users have after upgrading to El Capitan, Sierra or High Sierra is an error message when trying to access certain websites or run apps that require Java and this tutorial helps fix that. There are also issues regarding legacy support for Java 6 in macOS 10.12 Sierra which we clarify at the end of the article. Note that we don’t recommend you install Java unless absolutely essential because it’s notoriously unstable and insecure and once installed, you can’t ever fully uninstall Java from a Mac. However, if you’re one of those people that has no choice because the website you need to access, application you want to use or the game you want to play requires it, follow these instructions.
Quick Navigation
How To Install Java On El Capitan, Sierra & High Sierra
If you’ve upgraded to El Capitan,macos Sierra or High Sierra and keep receiving the error message pop up:
To use the “java” command line tool you need to install a Java SDK
It’s because an application you have installed or a website you’re trying to access requires Java to launch or work properly. If you’ve never installed Java on Mac, then you can simply download and install the latest version of Java from Oracle which is known as Java 8 but rather confusingly officially called Java 1.8 by Oracle.
If you’re not sure whether Java is installed on your Mac, simply search for Terminal in Spotlight and type: java -version at the command prompt.
If Java is on your Mac, you’ll see a message saying something like “Java (TM) Runtime Environment” in this case version 1.6 (or Java 6 as it is commonly known). If you find that you already have Java 1.6 installed, scroll down below “How to update Java 6 in El Capitan” as you also need to install a special update from Apple.
Java Installation Problems in El Capitan, Sierra & High Sierra
If you run into problems during the installation of Java, it’s because Apple has added an extra layer of security to Macs known as Rootless SIP. Java has such a bad rep on Macs that Apple has made it increasingly difficult to install it and other things that can potentially damage OS X. If your Mac is blocking the installation of Java, follow these instructions to disable rootless SIP and try again:
- Restart your Mac when the screen turns black hold down ⌘R until the Apple logo appears.
- Select the “Utilities” menu and then “Terminal”. In Terminal type: csrutil disable
- Hit Return and then restart OS X. Your Mac will then restart with SIP disabled and you can try installing Java again.
- To re-enable System Integrity Protection, follow exactly the same procedure except type: csrutil enable
- Rootless SIP is then renabled on your Mac.
Note: You will have to deactivate SIP when new updates for Java are released as Java will not update while SIP is enabled.
How To Update Java 6 On Mac
If you find that Java apps or applets will either refuse to run or open briefly before crashing giving you an error message such as “This application requires the legacy Java SE 6 runtime which is unavailable for this version of OS X”:
or the Java applet crashes with an error message such as:
com.apple.xpc.launchd[1]: (com.apple.xpc.launchd.oneshot.0x10000004.OSXJavaLauncher[395]) Service exited with abnormal code: 1
It’s because some applications, games and websites still only work with Java 6. Examples of people that may still need Java 6 are those trying to access some government sites, some online games and Android programmers that require Java 6 to develop Android apps on Mac. If you’re having problems running Java 6 on your Mac in El Capitan then you simply need to install Apple’s legacy Java 6 OS X 2015-001 update. This is a special update from Apple which allows the outdated Java 6 to safely run on your Mac. In the release notes for the Java 6 update, Apple states:
Java for OS X 2015-001 installs the legacy Java 6 runtime for OS X 10.11 El Capitan, OS X 10.10 Yosemite, OS X 10.9 Mavericks, OS X 10.8 Mountain Lion, and OS X 10.7 Lion. This package is exclusively intended for support of legacy software and installs the same deprecated version of Java 6 included in the 2014-001 and 2013-005 releases.
To install the update, you must quit any Java applications that are running and then simply download and double click on the Jave 6 update file and the update will automatically install. If you run into problems during installation, you’ll need to disable Rootless SIP protection in OS X (see above). Note that Java 6 does not officially work with OS X 10.12 Sierra although some users have had success with it so it may work and it seems to depend on the specific app you need it for.
Note: Do not get Java confused with JavaScript! JavaScript is an essential component for most browsers that enables it to display certain elements properly and is completely different to Java despite the confusingly similar name. Disabling JavaScript will mean many websites simply won’t work in your web browser anymore.
Support For Java 6 In Sierra
The bad news for those that need Java 6 on macOS 10.12 Sierra is that it is no longer officially supported on anything higher than OS X 10.11 El Capitan. Due to various security and support issues, last year Apple announced plans to discontinue any support for Java 6 in future versions of OS X:
OS X v10.11 is the last major release of OS X that will support the previously deprecated Java 6 runtime and tools provided by Apple. Applications or features that depend upon Java 6 may not function properly or will not launch when Java 6 is removed. Developers should move to a newer version of Java as provided by Oracle.
However the Apple link that Oracle refers users to has now been removed by Apple leaving some doubt as to whether Apple has had a change of heart regarding support for Java 6 on Sierra. Some Mac users are reporting that you can still install Java 6 on Sierra and it works for some apps but not for others. In the case of Cyberduck for example, it seems that the developer has updated the app to work with Java 6 in Sierra so it may well be down to individual developers whether they force their apps to work with it. Our advice is don’t rely using Java 6 on Sierra until Apple clarify whether it will be officially supported. Java 7 and 8 are officially supported in OS X 10.12 Sierra and if you don’t need Java 6, we highly recommend updating to Java 7 or 8 because Java is notoriously insecure and older versions are particularly vulnerable to attack and bugs.
As stated in the introduction, if it’s not necessary to you, you’re better off not installing Java at all on your Mac as it’s an increasingly antiquated platform that often causes more problem’s than it’s worth. And you can never fully remove Java from a Mac although you can find instructions how to disable Java on your Mac here.
If you have any other problems running Java in El Capitan, Sierra or High Sierra on your Mac, let us know in the comments below.
With the very latest version of High Sierra, it is impossible to install the latest jre6. Opening the .dmg prompts to delete it right away. Using disk-utility I can mount the disk, but the the .pkg won’t open. Rather frustrating. I even disabled the system integrity. That didn’t help.
On my other mac, running El Capitan the .dmg and .pkg work fine.
i have just installed java 6 and in my older version of photoshop( pre annual fee CS5.1) i am now having issues with moving or zooming on frames. It creates a tiling effect of repeated panels. Any ideas ?
Java is an antiquated platform really? Just attended the g3summit in Austin last week. Seems alive and well on the 90% of mac users and speakers in attendance. More fake news?
OK antiquated is probably not the right word but it’s safe to say that Java related issues and problems mean it’s more trouble than it’s worth on Mac nowadays.
Dear Rick, many thanks. I did get the software running in the end, somehow, one piece of it needed Java 6 and the other current Java, thanks to some command sequences it worked; was lucky ’cause had to type them without figuring out 100%.
But I’ll keep the link as a backup! Filippo
Hi Filippo, don’t know if it’s any help but on Oct 26 Apple released an updated version of their previous Legacy Java 6 download. Here is the link I used https://support.apple.com/kb/dl1572?locale=en_GB (this is the UK one). I have just downloaded it & can now use my old version of photoshop with High Sierra, but this latest version also includes support for El Capitain
Thanks for the tip Rick. The updated Legacy Java 6 download for US user is here if it helps anyone: https://support.apple.com/kb/dl1572?locale=en_US
Am running El Capitan, I need Java 6 Legacy for access to Italian govt. site. Mac was running current Java version, so I went through the bash commands to uninstall Java so to reinstall Java 6., incl. the root enabling. Unfortunately the Java 2014-001 dmg does not mount because it say there is a newer version already. But I have deleted everything, incl directories from Library and System Library. Filippo
Hi Eddie, when you say “this method works”, can you clarify what method you mean. I have an old version of Adobe Photoshop (CS3 I think) and my replacement Mac has High Sierra installed. After migrating my data to the High Sierra mac, I get the message that I need Java SE Runtime 6 in order to open PS. (I think I had the Jave SE 6 download for my previous machine running El Capitain). Regards
For anyone trying to having problems installing Java 6 so that they can run Illustrator CS6 on High Sierra, this method works.
Thanks for confirming that Eddie.