How to Install Java in OS X El Capitan. Guys, Spare time for s new boy. Had an update msg to update 8 91 to 8 101 on the iMac and it D/L’s the file.
I have installed Oracle’s JDK 8 on Mac OS X El Capitan in an attempt to allow Libre Office (LO) macro within a Spreadsheet and also for database use. I have had partial success, but any of the changes I make in the ‘Security’ setting i.e. Macro-Security-change to Medium, ‘Trusted folder’ etc are lost on exit from LO; bringing me back to square one.
It also seems impossible to create a database within LO for clearly connected reasons relating to the (alleged) absence of JRE.
I believe that there may be something specific about the ‘El Capitan’ O/S which seeks to prevent a smooth ride in this department, and as a newbie to the MAC environment at least any advice would be appreciated.
My previous post about installing Java on OS X received quite a bit of traffic, and I felt that some of the information was outdated, and it became a little unclear after all the edits, so I’ve endeavoured to create a much easier to understand set of instructions.
The instructions for installing the JDK (Java Development Kit) are a subset of the instructions for installing just the JRE, because Oracle provides an installer for the JDK.
jdk-8u60-macosx-x64.dmg
, but perhaps a newer version..dmg
Disk Image and run the installer.Terminal
Info.plist
file to enable the included JRE to be used from the the command line, and from bundled applications:The third line fixes a permissions issue create by using defaults write
. The fourth line is not required, but makes the file more user-friendly if you open it again in a text editor.
JAVA_HOME
environment variable. The recommended way is to use /usr/libexec/java_home
program, so I recommend setting JAVA_HOME
in your .bash_profile
like Jared suggests:This will get the latest installed Java’s home directory by default, but check out man java_home
for ways to easily get other Java home directories.
You should be done now, so try and open the application. If it does not work, some applications require legacy Java 6 to be installed. You can have it installed without actually using it, however, it’s possible to trick the applications into thinking legacy Java 6 is installed, without actually doing so.
If you’re running El Capitan, this is actually a little difficult now, because Apple added SIP (System Integrity Protection) to OS X. I have written a post explaining how to disable and enable SIP.
If you’ve disabled SIP, or are not running El Capitan yet, you can trick some applications into thinking legacy Java 6 is installed by creating two folders with the following commands in Terminal
:
Don’t forget to enable SIP again after creating these directories.