Installing Latest JDK on macOS

This section provides a tutorial example on how to download and install the latest version JDK, which includes some nice Java tools, on a macOS system.

As a Java developer kit, the Oracle JDK package includes a number of nice Java tools.

Here is what I did to download and install JDK 20, also called Java SE 20, on my macOS computer.

1. Go to Oracle Java SE download website at

2. Click "JDK 20 > macOS" tab.

3. Click on the "jdk-20_macos-x64_bin.dmg" link in the "x64 DMG Installer" line to download the installation file to your "Downloads" directory.

4. Double-click on the "jdk-20_macos-x64_bin.dmg" file to install it.

To test the installation, open a command window to try the java command.

herong$ java -version
java version "20.0.1" 2023-04-18
Java(TM) SE Runtime Environment (build 20.0.1+9-29)
Java HotSpot(TM) 64-Bit Server VM (build 20.0.1+9-29, mixed mode, sharing)

Cool, I have successfully installed JDK 20 on my macOS computer!

Table of Contents

 About This Book

 Java Tools Terminology

Java Tools Included in JDK

Installing Latest JDK on macOS

 Installing Latest JDK on Windows

 Adding JDK "bin" Direcotry to Path Setting

 Testing JDK Installation

 Listing Java Tools in JDK

 javac - The Java Program Compiler

 java - The Java Program Launcher

 jar - The JAR File Tool

 jlink - The JRE Linker

 jmod - The JMOD File Tool

 jimage - The JIMAGE File Tool

 jpackage - Binary Package Builder

 javadoc - The Java Document Generator

 jdeps - The Java Class Dependency Analyzer

 jdeprscan - The Java Deprecated API Scanner

 jdb - The Java Debugger

 jcmd - The JVM Diagnostic Tool

 jconsole - Java Monitoring and Management Console

 jstat - JVM Statistics Monitoring Tool

 JVM Troubleshooting Tools

 jhsdb - The Java HotSpot Debugger

 jvisualvm (Java VisualVM) - JVM Visual Tool

 jmc - Java Mission Control

 javap - The Java Class File Disassembler

 keytool - Public Key Certificate Tool

 jarsigner - JAR File Signer

 jshell - Java Language Shell

 jrunscript - Script Code Shell

 Miscellaneous Tools

 native2ascii - Native-to-ASCII Encoding Converter

 JAB (Java Access Bridge) for Windows

 Archived Tutorials


 Full Version in PDF/EPUB