How to Install the JDK (Java Development Kit) on Mac OS X

21st December 2018 4 By Alin Bistrian

In this tutorial, I will show you step by step how to install JDK (Java Development Kit) on your Mac OS X. For those of you who are in the office and cannot watch a video tutorial, you can use the step by step screenshots tutorial, who prefer the video tutorial scroll down the bottom where you can find the video version of this tutorial.

Before you start, make sure that you have an Administrator Password 

Java Development Kit (JDK) Installation

First, we need to check if there is any JDK already installed on your Mac

  1. Launch a terminal window;
  2. In the terminal window type    java -version    command and press enter;
  3. If there is no java installation you should get a message something like
  4. No Java runtime present, requesting install.    and also you will be presented with a pop-up window with information on how you can install the JDK: 

  5. Clicking on the buttonMore Info... will launch the Oracle JDK Downloads page in a new browser window where you can see that the latest version at the time of writing the tutorial is Java Platform (JDK) 10. If for any reasons the Oracle website does not launch here is the JDK downloads link:  Java Development Kit (JDK) Downloads Page;
  6. On the downloads page click on the Downloadbutton;
  7. On the JDK 10 Downloads page accept them     Accept License Agreement    and click on the     jdk-10.0.2_osx-x64_bin.dmg    link which should download the JDK 10;
  8. After the download completes navigate to your download directory and double click on the   jdk-10.0.2_osx-x64_bin.dmg     file;
  9. Double-clicking should launch the     Java Development Kit     package installation:
  10. Go ahead and double click on the box icon which should start the JDK Installer window;
  11. On the     Introduction     window of the JDK Installer click on the Continuebutton;
  12. On the     Installation Type    window click on the Installbutton;
  13. Here is where you need to provide the administrator password and click on the  Install Softwarebutton;
  14. After the installation is completed you should be presented with a Install Succeededscreen which is ok to close it by clicking on the     Close     button;
  15. Navigate back or open a new Terminal Window if you shut it and run again the command     java -version    and press enter which should print the version of JDK that we just installed;

In the next section you can find a video version of this tutorial:

Thank you very much for using this tutorial.