Skip to content

Instantly share code, notes, and snippets.

@deild
Last active February 2, 2020 11:43
Show Gist options
  • Select an option

  • Save deild/56398ccbbc18fe1b65948b3512431617 to your computer and use it in GitHub Desktop.

Select an option

Save deild/56398ccbbc18fe1b65948b3512431617 to your computer and use it in GitHub Desktop.
macOS OpenJDK PKG installer packages

macOS OpenJDK PKG installer packages

AdoptOpenJDK macOS installer packages are available as standard .pkg files, which can be run with an interactive user interface or run silently from the Terminal command line.

GUI installation Instructions for running an interactive installation using the macOS PKG installer.

  1. Download the .pkg file.

  2. Navigate to the folder that contains the file and open it to launch the installation program or drag the icon to your Application folder.

  3. The Introduction screen indicates the target location for the installation, which you can change later in the install process. Click Continue.

  4. Read the license, click Continue and accept the license if you are happy with the terms.

  5. Change the target location for the installation. Click Install to complete the installation.

Command-line installation A silent installation allows you to install the macOS package without user interaction, which can be useful for widescale deployment. You must have administrator privileges. Follow these steps:

  1. Download the .pkg file. (https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.6_10.pkg )

  2. Launch the Terminal app (terminal.app).

  3. Run the following command:

sudo installer -pkg <path_to_pkg>/<pkg_name>.pkg -target /
  1. Enter the Administrator password.

  2. AdoptOpenJDK installs to /Library/Java/JavaVirtualMachines/AdoptOpenJDK-<version>.<jdk|jre>/

more information https://dzone.com/articles/installing-openjdk-11-on-macos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment