Installation on macOS Using a DMG Package through the CLI

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

  1. Download the installation package to your local Downloads folder.

  2. Open the Terminal.app and use the following commands to mount the.dmg package.

    cd Downloads

    hdiutil mount <zulu_package>.dmg

  3. In the last line of the output you can find the mounted path, e.g.:

    [...] /dev/disk2s1 Apple_HFS /Volumes/Zulu OpenJDK 11.33+15

  4. Run the installer located at that path.

    sudo installer -pkg "/Volumes/Zulu OpenJDK 11.33+15/Double-Click to Install Zulu 11.pkg" -verbose -target /

Sample system response:

installer: Package name is Zulu 11.33+15 installer: Upgrading at base path / installer: Preparing for installation..... installer: Preparing the disk..... installer: Preparing Zulu 11.33+15..... installer: Waiting for other installations to complete..... installer: Configuring the installation..... installer: installer: Writing files..... installer: Writing files..... installer: Moving items into place..... installer: installer: Writing package receipts..... installer: Validating packages..... installer: Running installer actions installer: installer: Finishing the Installation..... installer: The software was successfully installed...... installer: The upgrade was successful.

All Zulu files for the OpenJDK are expanded into appropriate folders relative to the <zulu_dir>/<zulu_jdk> subfolder. For the above example:

/Library/Java/JavaVirtualMachines/zulu-11.jdk