Installation

AdoptOpenJDK binaries are available for download in the following types of installation package:

The binaries are supported on the architectures and operating systems listed in Supported Platforms. If you're migrating to AdoptOpenJDK, you can learn about the differences between Oracle JDK and AdoptOpenJDK in our Migration Guide and any steps that you might need to take. For example, how to use IcedTea-Web as an alternative to Webstart.


Archive files

1. Choose a Version

2. Choose a JVM

Platform:


Installers

Installers are currently available for Windows® and macOS® JDK and JRE packages, which can be obtained from the Download page. Installation steps are covered in the following sections:

Windows MSI installer packages

AdoptOpenJDK Windows installer packages are available as standard .msi files, which can be run with an interactive user interface or run silently from the command line. The installer is designed for use on a per-machine basis, not per-user basis, so you can have only one installation of the MSI on a machine for all users.

Note: Windows installer packages are supported only on Windows x64 systems.

GUI installation

Instructions for running an interactive installation using the Windows MSI installer.

1. Download the .msi file. Open it to launch the installation program.

2. Read and accept the license if you are happy with the terms.

3. On the Custom Setup screen you can choose the features that you want to install and optionally change the default installation directory. By default, AdoptOpenJDK installs to c:\Program Files\AdoptOpenJDK\<package> with the following features, which you can deselect, if necessary:

  • Add the installation to the PATH environment variable
  • Associate .jar files with Java applications
Additional features can be selected by clicking on the directory tree where you see a check mark (x). These features include:
  • Updating the JAVA_HOME environment variable
  • Installing IcedTea-Web
  • Associate .jnlp files with the IcedTea-Web application

4. When you have chosen the features that you want to install, click Next.

5. Click Install to begin the installation.

6. When the installation is finished, click Finish to close the program.

Command-line installation

A silent installation allows you to install the Windows package with pre-selected features without user interaction, which can be useful for widescale deployment. Follow these steps:

1. Download the .msi file.

2. Choose the features that you want to install, which are shown in the following table:

Feature Description
FeatureMain Core AdoptOpenJDK installation (DEFAULT)
FeatureEnvironment Update the PATH environment variable (DEFAULT)
FeatureJarFileRunWith Associate .jar files with Java applications (DEFAULT)
FeatureJavaHome Update the JAVA_HOME environment variable
FeatureIcedTeaWeb Install IcedTea-Web
FeatureJNLPFileRunWith Associate .jnlp files with IcedTea-web
FeatureOracleJavaSoft Updates registry keys HKLM\SOFTWARE\JavaSoft\

Note: FeatureOracleJavaSoft can be used to prevent Oracle Java launching from PATH when AdoptOpenJDK is uninstalled. Reinstall Oracle Java if you need to restore the Oracle registry keys.

Optional parameters can be used that group some of the features together:

Parameter Features
INSTALLLEVEL=1 FeatureMain,FeatureEnvironment,FeatureJarFileRunWith
INSTALLLEVEL=2 FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome,FeatureIcedTeaWeb
INSTALLLEVEL=3 FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome,FeatureIcedTeaWeb,FeatureJNLPFileRunWith

3. Run the command on the target workstation.

The following example silently installs AdoptOpenJDK, updates the PATH, associates .jar files with Java applications and defines JAVA_HOME:

msiexec /i <package>.msi ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome INSTALLDIR=c:\Program Files\AdoptOpenJDK\ /quiet

Note: You must use INSTALLDIR with FeatureMain.

The following example silently installs all the features for INSTALLLEVEL=1:

msiexec /i <package>.msi INSTALLLEVEL=1 /quiet

If you want to launch an interactive installation in another language you can use the Windows installer TRANSFORMS option to set your language choice. For example, to set the UI language to German, use code 1031, which must be preceded by a :.

msiexec /i <package>.msi INSTALLLEVEL=1 TRANSFORMS=:1031

For a list of supported codes, see the Language list.

Reinstalling or upgrading

To reinstall AdoptOpenJDK in silent mode with default features, run the following command:

msiexec /i <package>.msi REINSTALL=ALL /quiet

If you want to upgrade AdoptOpenJDK in silent mode, run the following command:

msiexec /i <package>.msi REINSTALL=ALL REINSTALLMODE=amus /quiet

REINSTALLMODE options: (from Control Events)

  • a: Force all files to be installed regardless of checksum or version
  • m: Rewrite all required registry entries from the Registry Table that go to the HKEY_LOCAL_MACHINE
  • o: Reinstall if the file is missing or is an older version
  • u: Rewrite all required registry entries from the Registry Table that go to the HKEY_CURRENT_USER or HKEY_USERS
  • s: Reinstall all shortcuts and re-cache all icons overwriting any existing shortcuts or icons
Note: REINSTALL=ALL automatically sets REINSTALLMODE=omus

Upgrade limitation:

Upgrading .msi files works only for the first 3 digits of the build number due to an MSI limitation:

  • Upgrading 8.0.2.1 to 8.0.3.1 works.
  • Upgrading 8.0.2.1 to 8.0.2.2 does not work. Uninstall the previous .msi and install the new one.
  • Upgrading 8.0.2.1 to 8.1.2.1 works.
  • Upgrading 8.0.2.1 to 11.0.2.1 does not work. AdoptOpenJDK does not provide upgrades for major versions. Either keep both installations or uninstall the older one.

Reference reading

macOS 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.

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

3. Run the following command:

installer -pkg <path_to_pkg>/<pkg_name>.pkg -target /

4. Enter the Administrator password.

5. AdoptOpenJDK installs to /Library/Java/JavaVirtualMachine/AdoptOpenJDK-<version>.<jdk|jre>/