Java
Check and Download
Check if Java is already installed.
Type this in Terminal:
java -version
If you see an output like below then Java is already installed:
java version "1.8.0_112" Java(TM) SE Runtime Environment (build 1.8.0_112-b16) Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)
If not, you will see:
No Java runtime present, requesting install.
You should also see a dialog pop up:
To use the “java” command-line tool you need to install a JDK.
- Click More Info to install.
- Safari will be launched and you should see Oracle website loaded on Java SE Downloads page.
- Click the square Java download button: Java Platform (JDK) 8u111 / 8u112. (or the latest version at that time)
- On the "Java SE Development Kit 8 Downloads" page:
- Select "Accept License Agreement".
- Then click Mac OS X x64 to download.
- e.g. jdk-8u112-macosx-x64.dmg
Installation
- Open the dmg file.
- Then double-click on the package icon to proceed.
Once the installation is finish, type this again in Terminal:
java -version
You should able to see output like these:
java version "1.8.0_112" Java(TM) SE Runtime Environment (build 1.8.0_112-b16) Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)