avatarIgor Dosinchuk

Summary

The website provides instructions for installing Azul Zulu JDK 19 on Apple Silicon Macs using different package formats.

Abstract

The article outlines the process for installing the latest Java Development Kit (JDK) version 19 from Azul Zulu on Apple Silicon-based Macs. It details three methods for installation: using a DMG package through the GUI, a ZIP file, and a TAR.GZ file. Each method includes a step-by-step guide, from downloading the appropriate files from Azul's website to verifying the installation via a terminal command. The article also addresses potential issues with multiple Java versions installed on the system and how to specify the desired JDK version using the export java_home command.

Opinions

  • The author suggests that users should prepare the installation platform by completing tasks outlined in Azul's documentation before proceeding with the installation.
  • The article implies that the installation process is straightforward and can be completed by following the provided steps.
  • It is recommended to verify the installation to ensure that the JDK has been correctly installed and is accessible from the terminal.
  • The author acknowledges that users may encounter common errors due to multiple Java versions and provides guidance on how to resolve such issues by setting the java_home environment variable.

Install Azul Zulu JDK 19 on Apple Silicon | Mac M1

With the recent arrival of Java 19, new updates are coming and you can see them on the Oracle website. In this article, I am going to show you how to install this new JDK on any Apple Silicon.

For this article, I am going to use the Zulu JDK provided by Azul.

TL’DR:

  • Download the ‘.dmg’, ‘.zip’ or ‘.tar.gz’ files.
  • Install the JDK.
  • Verify the installation.

There are different ways to perform the installation. Choose the one that suits you best.

Installation on macOS Using a DMG Package through the GUI

Before you install Zulu, complete the tasks in the section, Preparing the Zulu Installation Platform.

  1. Double-click the downloaded DMG file and follow the wizard instructions.
  2. Verify your in installation by running the java -version command in a terminal.
Verify installation.

Installation on macOS Using the Zulu ZIP File

Before you install Zulu, complete the tasks in the section, Preparing the Zulu Installation Platform.

  1. Launch Finder and navigate to the download folder.
  2. Double click the file to unpack it. If you download the file using Safari, it may automatically unpack the file. Alternatively, you can use the command below to unpack the file: unzip <zulu_package>.zip The folder where you unpacked the archive is your Azul Zulu installation folder.
  3. To verify your Azul Zulu installation, run the following command in a terminal window: <installation_folder>/bin/java -version

Installation on macOS Using the Zulu TAR.GZ File

Before you install Zulu, complete the tasks in the section, Preparing the Zulu Installation Platform.

  1. Launch Finder and navigate to the download folder. Double click the file to unpack it. If you download the file using Safari, it may automatically unpack the file. Alternatively, you can use the command below to unpack the file: tar -xzvf <zulu_package>.tar.gz The folder where you unpacked the archive is your Azul Zulu installation folder.
  2. To verify your Azul Zulu installation, run the following command in a terminal window: <installation_folder>/bin/java -version

Common errors

If you have multiple versions of java installed, you may need to specify which one you want to use.

You can choose the desired JDK by executing from the terminal: export java_home=/PATH-TO-YOUR-JDK/Contents/Home example: export java_home=/Library/Java/JavaVirtualMachines/zulu-19.jdk/Contents/Home

Java19
Java
Mac
Apple Silicon
Zulu
Recommended from ReadMedium