How to Install OpenJDK 26 on a Mac Using SDKMAN
If you are a developer using a Mac, setting up Java should be quick, isolated, and painless. In this skill guide, you will learn how to install and manage OpenJDK 26 on macOS using SDKMAN!.
What is SDKMAN?
SDKMAN! (Software Development Kit Manager) is a free, command-line utility for managing parallel versions of multiple Software Development Kits on Unix-like systems (macOS and Linux).
Instead of downloading .dmg or .tar.gz archives and manually configuring JAVA_HOME and PATH in your .zshrc, SDKMAN automates candidate installation, version switching, and environment variables automatically.
Step 1: Open Your Terminal
- Press Command + Space to open Spotlight Search.
- Type Terminal and press Enter.
Step 2: Install SDKMAN
Run the official installation script in your terminal:
curl -s "https://get.sdkman.io" | bash Once installation finishes, initialize SDKMAN in your current shell:
source "$HOME/.sdkman/bin/sdkman-init.sh" Verify that SDKMAN is installed and ready:
sdk version Step 3: Install OpenJDK 26
To see all available Java distributions from vendors (Temurin, Oracle, Microsoft, Corretto, GraalVM), run:
sdk list java To install OpenJDK 26, run:
sdk install java 26-open SDKMAN will download and link OpenJDK 26. When prompted: Do you want this to be set as default? (Y/n) Type Y and press Enter.
Step 4: Verify Your Java Version
Check that the active Java runtime is OpenJDK 26:
java -version Output confirmation:
openjdk version "26" 2026-03-17
OpenJDK Runtime Environment (build 26+35)
OpenJDK 64-Bit Server VM (build 26+35, mixed mode, sharing) Pro Tip: Switching Java Versions Instantly
Whenever a project requires an LTS version (e.g. Java 21 or Java 17), switch versions on the fly with:
sdk use java 21-open
Comments & Discussion