Install Azul Zulu on Debian or Ubuntu
This section explains how to install Azul Zulu builds of OpenJDK on Debian or Ubuntu. You can use the Azul APT repository, download a DEB package manually, or download a binary TAR.GZ package.
Install from Azul APT repository
You can add Azul’s APT repository to the list of package sources on your system and install Azul Zulu by using your OS package manager.
The Azul APT repository provides packages for the following architectures:
CPU architecture | Azul Zulu versions |
---|---|
x86 |
7, 8, 11, 13, 15, 16 |
arm64 |
15, 16 |
Note
|
The Azul’s repository contains DEB packages for the x86 and arm64 architectures. If your machine has a different CPU architecture (for example, arm32), consider installing the appropriate TAR.GZ package. You can find TAR.GZ packages for all supported platforms on the Downloads page. |
Installing with a package manager requires root privileges. Log in as root
or use sudo
when running the commands listed below.
-
Set up the Azul APT repository:
$ # install the necessary dependencies $ sudo apt-get -q update $ sudo apt-get -yq install gnupg curl $ # add Azul's public key $ sudo apt-key adv \ --keyserver hkp://keyserver.ubuntu.com:80 \ --recv-keys 0xB1998361219BD9C9 $ # download and install the package that adds $ # the Azul APT repository to the list of sources $ curl -O https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-2_all.deb $ # install the package $ sudo apt-get install ./zulu-repo_1.0.0-2_all.deb $ # update the package sources $ sudo apt-get update -
When the repository is set up, install the required Azul Zulu package by running
apt-get install <package>
. For example, to install Azul Zulu JDK 11, run:$ # install Azul Zulu JDK 11 $ sudo apt-get install zulu11-jdkSee the Azul Zulu Packages section below for information about available packages.
-
To verify your installation, run the
java -version
command. You should see output similar to the following:$ java -version openjdk version "11.0.10" 2021-01-19 LTS OpenJDK Runtime Environment Zulu11.45+27-CA (build 11.0.10+9-LTS) OpenJDK 64-Bit Server VM Zulu11.45+27-CA (build 11.0.10+9-LTS, mixed mode)
Azul Zulu Packages
The Azul APT repository uses the package dependency paradigm typical for Linux distributions where packages that provide complex functionality depend on packages with more basic functionality. Thus, the JDK package is split into multiple packages, such as JRE, documentation, source files, and so on. When you install the JDK package, you install the package itself and all its dependencies. You can install the dependent packages separately. For example, if your application requires JRE only, you can install just the JRE package (or headless JRE) without downloading unnecessary dependencies.
The following table lists the DEB packages that are available from the Azul APT repository.
The <X>
placeholder stands for the major Java version.
Package | Description |
---|---|
|
An empty package that installs |
|
Java Development Kit (including graphic components). |
|
Headless Java Development Kit (without GUI support). |
|
Java Runtime Environment including graphic components. |
|
Headless Java Runtime Environment (without GUI support). |
|
Azul Zulu JDK source files. |
|
Man pages for the executable commands. |
|
JDK demos and examples. |
For each package listed in the table there is another package that does not contain the -ca-
suffix in its name.
For example, zulu11-ca-jdk
and zulu11-jdk
.
The latter is an empty package that has its "ca" counterpart as a dependency.
Either package installs Azul Zulu JDK.
Installation Folder
The Azul Zulu DEB packages from the APT repository are installed in the following folder.
/usr/lib/jvm/zulu<X>-ca-<arch>
Where <X>
is a major Java version (for example, 8 or 15) and <arch>
is the CPU architecture.
For example, here is the default installation folder for Azul Zulu 15:
/usr/lib/jvm/zulu15-ca-amd64
Install DEB package
You can download the Azul Zulu DEB package from the Azul Download page and install it manually using the APT package manager. Azul provides three types of downloadable DEB packages: JDK, JDK with JavaFX, and JRE. See Downloadable DEB Packages for more information.
Installing with a package manager requires root privileges.
Log in to your root
account or use sudo
to run the commands listed below.
-
Download the appropriate DEB package for your OS from the Downloads page.
-
Verify that the checksum of the downloaded file matches the value provided on the download page. To calculate the checksum, use this command:
sha256sum <package>.deb -
Run the command below in the directory where you saved the DEB package. Replace the
<package>
placeholder with the actual name of the file. The command may ask you to confirm that you want to install the package dependencies.sudo apt install ./<package>.debFor example, to install JDK 15 for AMD64, run:
sudo apt install ./zulu15.29.15-ca-jdk15.0.2-linux_amd64.debThe package is installed in
/usr/lib/jvm/zulu-15-amd64
. -
Verify your installation by running
java -version
in a terminal window. You should see output similar to the following:$ java -version openjdk version "15.0.2" 2021-01-19 OpenJDK Runtime Environment Zulu15.29+15-CA (build 15.0.2+7) OpenJDK 64-Bit Server VM Zulu15.29+15-CA (build 15.0.2+7, mixed mode, sharing)
Downloadable DEB Packages
Unlike the packages available from the Azul repository, the downloadable DEB packages are all-in-one packages, meaning they do not depend on other Azul packages, but already contain all dependent components (docs, source files, etc). They also install Azul Zulu in a different folder.
The following list provides information about the DEB packages you can download from Azul Downloads.
-
Azul Zulu JDK package:
Package Name:
zulu-<major_version>
Installation Folder:
/usr/lib/jvm/zulu-<major_version>-<arch>
-
JRE package:
Package Name:
zre-<major_version>
Installation Folder:
/usr/lib/jvm/zre-<major_version>-<arch>
-
JDK package with JavaFX:
Package Name:
zulu-fx-<major_version>
Installation Folder:
/usr/lib/jvm/zulu-fx-<major_version>-<arch>
Install from binary TAR.GZ file
You can download and use the binary tar.gz
package, if necessary.
-
Download the appropriate
.tar.gz
package for your OS from Azul Downloads. -
Verify that the checksum of the file matches the value provided on the download page. To calculate the checksum, use this command:
sha256sum <package>.tar.gzExample output:
$ sha256sum zulu11.45.27-ca-jdk11.0.10-linux_x64.tar.gz 0bd85593bae021314378f3b146cfe36a6c9b0afd964d897c34201034ace3e785 zulu11.45.27-ca-jdk11.0.10-linux_x64.tar.gz -
Extract the package content into a folder.
tar -xzvf <package>.tar.gzThis command creates a folder named to match the installation package name without
.tar.gz
. This is your Azul Zulu installation folder. -
Verify that the package was unpacked successfully by running the following command:
$ <installation_folder>/bin/java -version openjdk version "11.0.10" 2021-01-19 LTS OpenJDK Runtime Environment Zulu11.45+27-CA (build 11.0.10+9-LTS) OpenJDK 64-Bit Server VM Zulu11.45+27-CA (build 11.0.10+9-LTS, mixed mode) -
(Optional) Add
<installation_folder>/bin
to yourPATH
environment variable, so that you can executejava
from any directory without specifying the full path.export PATH=<installation_folder>/bin:$PATH