How to download and install Java on macOS

In this article, we will learn how to install Java JDK on macOS. With that, to avoid any hassles in the future, we will also let you know how to verify the installation.

Download Java JDK on Mac

To download Java JDK, go to Oracle’s official website and click “Download Java“:

Download-Java-JDK-15-Windows

Now, click “JDK Download” to download:

Click-Java-JDK-15-Download-to-download

Now, the Downloads page will be visible.

Go to the bottom of the page, and click on the macOS installer, i.e., jdk-15.0.1_osx-x64_bin.dmg as shown below:

Download JAVA 15 FOR MAC

Now, accept the License Agreement as shown in the screenshot below.

After accepting, click on Download jdk-15.0.1_osx-x64_bin.dmg:

Downloading JAVA 15 dmg file FOR MAC

Just wait for a few minutes till the download finishes. The downloaded JDK dmg file will be saved in the Downloads folder.

Install Java on Mac

The download finished as in the screenshot below. Right-Click on the jdk-15.0.1_osx-x64_bin.dmg and press “Show in Finder” to begin installation:

Open java 15 dmg file in Mac Finder

We have reached the Downloads folder. Double-click to begin installation:

Java 15 downloaded in Downloads folder

After double-clicking, it will begin opening the .dmg file:

Java 15 dmg file

The following .pkg file (PKG) is now visible. A PKG file is a package of compressed installer files for JAVA. To begin installation, double-click on the file:

Java 15 pkg file

The installation finally begins. Click Continue as in the screenshot below:

JAVA 15 installation begins on macOS
Now, click Install in the Installation Type step as shown below:

Install Type for JAVA 15.0.1

Now, type the MAC Admin password and click Install Software:

Enter MAC admin password to begin Java 15 installation

The final installation begins:

Java 15 installation begins

Java installation completes as in the screenshot below.

Click Close:

Java 15.0.1 installation completes on MAC

While installing JAVA JDK on MAC, you don’t need to set the Environment Variable like we saw while Installing Java on Windows 10.

Verify Java Installation

We saw how to install Java JDK above. We installed it on macOS. Now, we can easily verify whether the installation was successful or not using the following command:

java -version

Now, let us open the Terminal by pressing CTRL + T and type the command
java -version to verify whether we have installed JAVA successfully or not on MAC:

Verify java 15 installation on MAC

On pressing ENTER, if the following is visible, that would mean the Java JDK installation on MAC is successful:

Java 15 installation on MAC successful

In this tutorial, we saw how to install Java on MAC. After installation, we verified the installation of Java JDK successfully.

Here’s the YouTube video for the steps we saw above to install Java on macOS:


If you liked the tutorial, spread the word and share the link and our website Studyopedia with others:

Support us: DONATE


Read More:

How to download & install Java 15 on Windows 10
How to install Java 16 on Windows 10
Studyopedia Editorial Staff
contact@studyopedia.com

We work to create programming tutorials for all.

No Comments

Post A Comment