In this post, I’d like to share the steps to download and install Oracle JDK 17 on macOS operating system. Oracle JDK is a commercial distribution of Java SE Development Kit (JDK), and JDK 17 is a Long-Term Support (LTS) release of Java SE, which was available to public since September 14th 2021.

You can use Oracle JDK for any purpose (personal, development or production use).

 

1. Download DMG Installer for Oracle JDK 17

Head over to the official download page of Oracle JDK 17. You will see the following page:

download oracle jdk 17 for macos

Click the link next to Arm 64 DMG Installer if your Mac running on Apple’s CPU, else click the link next to x64 DMG Installer for Intel’s CPU.

And you should verify SHA256 checksum of the downloaded .dmg file before running it. Type the following command in a new Terminal window:

shasum -a 256 jdk-17_macos_aarch64_bin.dmg

Before that, you need to change the current directory to location of the downloaded .dmg file. Then compare the checksum value generated by this command against the value published on Oracle’s website (the link sha256 next to download link). If they are the same, you can safely use the DMG installer for Oracle JDK 17.


2. Install Oracle JDK 17 on macOS

Next, double click the downloaded .dmg file, it will extract to JDK 17.0.3.pkg package. Then double click the JDK package icon to launch the installer. You’ll see JDK installer appears:

oracle jdk 17 installer macos

Click Continue and Install to proceed the installation. It should be very quick. You may need provide administrator password to install the software.

And click Close to exit the installer. If asked to move the installer to trash, choose Move to Trash.

The JDK installer installs JDK 17 into /Library/Java/JavaVirtualMachines/jdk-17.0.3.jdk directory and puts java and javac programs under /usr/bin directory which is included in the PATH environment variable by default.

To verify, type java -version and javac -version in the terminal window:

check oracle jdk 17 version macos

If you see this output, that means Oracle JDK 17 was successfully installed on macOS.

Notes: If you have previously installed JDK, you need to remove it or update system environment variables for the change to take effect.

To see the steps of installing Oracle JDK 17 in action, I recommend you watch the following video:

[Video will be updated soon]

 

Related Articles:


About the Author:

is certified Java programmer (SCJP and SCWCD). He began programming with Java back in the days of Java 1.4 and has been passionate about it ever since. You can connect with him on Facebook and watch his Java videos on YouTube.



Add comment