Visit Azul.com Support

Install Azul Zulu on Linux and macOS with SDKMAN!

This section explains how to install Azul Zulu Builds of OpenJDK with SDKMAN! on Linux and macOS.

Note
SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems. It provides a convenient Command Line Interface (CLI) and API for installing, switching, removing and listing Candidates.

By using SDKMAN!, you can install Azul Zulu Builds of OpenJDK with a single command:

 
sdk install java 21.0.4-zulu

Follow these steps for more detailed information.

Install SDKMAN!

Follow the installation guidelines provided on the SDKMAN! website.

Using SDKMAN!

List Available Java Versions

SDKMAN! detects your computer OS and platform and lists all the available distributions and versions. For instance, on a macOS M1, all these Azul Zulu Builds of OpenJDK are listed (this list changes with each new release):

 
$ sdk list java ================================================================================ Available Java Versions for macOS ARM 64bit ================================================================================ Vendor | Use | Version | Dist | Status | Identifier -------------------------------------------------------------------------------- ... Zulu | | 22.fx | zulu | | 22.fx-zulu | | 22.0.2.fx | zulu | | 22.0.2.fx-zulu | | 22.0.2 | zulu | | 22.0.2-zulu | | 21.0.4.fx | zulu | | 21.0.4.fx-zulu | >>> | 21.0.4 | zulu | installed | 21.0.4-zulu | | 21.0.1.fx | zulu | | 21.0.1.fx-zulu | | 17.0.12.fx | zulu | | 17.0.12.fx-zulu | | 17.0.12 | zulu | | 17.0.12-zulu | | 11.0.24.fx | zulu | | 11.0.24.fx-zulu | | 11.0.24 | zulu | | 11.0.24-zulu | | 11.0.23.fx | zulu | | 11.0.23.fx-zulu | | 8.0.422.fx | zulu | | 8.0.422.fx-zulu | | 8.0.422 | zulu | | 8.0.422-zulu | | 8.0.402 | zulu | | 8.0.402-zulu ================================================================================

Install a Specific Version

To install a specific version, use the Identifier value from the table.

 
$ sdk install java 21.0.4-zulu Downloading: java 21.0.4-zulu In progress... ######################################################################## 100.0% Repackaging Java 21.0.4-zulu... Done repackaging... Installing: java 21.0.4-zulu Done installing! Setting java 21.0.4-zulu as default.

We can now check the installed Java version:

 
$ java -version openjdk version "21.0.4" 2024-07-16 LTS OpenJDK Runtime Environment Zulu21.36+17-CA (build 21.0.4+7-LTS) OpenJDK 64-Bit Server VM Zulu21.36+17-CA (build 21.0.4+7-LTS, mixed mode, sharing)

Uninstalling

SDKMAN! also allows you to easily remove already installed Java versions:

 
$ sdk uninstall java 17.0.12-zulu removed java 17.0.12-zulu.

Using SDKMAN! in Build Pipelines

With some extra configuration, it’s also possible to use SDKMAN! within your build pipelines to install additional tools required for your builds. This is an example extract from a GitLab pipeline:

 
maven_build: stage: build script: - curl -s "https://get.sdkman.io" | bash - source "$HOME/.sdkman/bin/sdkman-init.sh" - sdkman_auto_answer=false - sdkman_selfupdate_enable=false - sdk install java 21.0.4-zulu - sdk use java 21.0.4-zulu - sdk install maven 3.8.6 - sdk use maven 3.8.6 - mvn package

Other Use Cases

Not only Java, but also a lot of other tools can be installed with SDKMAN!, e.g.:

  • ActiveMQ

  • Ant

  • Asciidoctor

  • JBake

  • Spring Boot

  • …​

You can get the full list, including a lot of info with:

 
$ sdk list ================================================================================ Available Candidates ================================================================================ q-quit /-search down j-down ?-search up k-up h-help -------------------------------------------------------------------------------- Apache ActiveMQ (Classic) (5.17.1) https://activemq.apache.org/ Apache ActiveMQ<C2><AE> is a popular open source, multi-protocol, Java-based message broker...