Chapter 1. Getting Started with OpenJDK 11 for Windows

OpenJDK (Open Java Development Kit) is a free and open-source implementation of the Java Platform, Standard Edition (Java SE).

OpenJDK 11 for Windows provides a distribution of OpenJDK that follows the Red Hat Enterprise Linux distribution of OpenJDK as closely as possible on the Microsoft Windows platform. Windows builds use Red Hat Enterprise Linux RPM sources and apply all of the relevant RPM patches.

OpenJDK 11 for Windows includes OpenJDK, fonts, timezone data, and CA certificates from Red Hat Enterprise Linux.

1.1. OpenJDK 11 for Windows Installation Options

OpenJDK 11 for Windows can be installed manually using a ZIP bundle or through a graphical user interface using an MSI-based installer.

Depending on your circumstance, use one of the following installation methods:

1.2. Installing OpenJDK with the ZIP Bundle

To manually install OpenJDK 11 for Windows using the ZIP bundle:

  1. Download the ZIP bundle of OpenJDK 11 for Windows.
  2. Extract the contents of the ZIP bundle to a directory of your choice.

    Note

    Extracting the contents of the ZIP bundle to a directory path that does not contain spaces is recommended.

  3. Add the bin directory contained in your OpenJDK 11 for Windows installation path to the %PATH% environment variable:

    C:\> setx /m PATH "%PATH%;C:\Progra~1\RedHat\java-11-openjdk-11.0.1.13-1\bin"

    If the path contains spaces, use the shortened path name.

  4. Restart Command Prompt to reload the environment variables.

The %JAVA_HOME% environment variable must also be set to use some developer tools. Set the %JAVA_HOME% environment variable as follows:

  1. Open Command Prompt as an administrator.
  2. Set the value of the environment variable to your OpenJDK 11 for Windows installation path:

    C:\> setx /m JAVA_HOME "C:\Progra~1\RedHat\java-11-openjdk-11.0.1.13-1"

    If the path contains spaces, use the shortened path name.

  3. Restart Command Prompt to reload the environment variables.

1.3. Installing OpenJDK with the MSI Installer

To install OpenJDK 11 for Windows using the MSI-based installer:

  1. Download the MSI-based installer of OpenJDK 11 for Windows for your architecture.
  2. Run the installer and follow the on-screen instructions to install OpenJDK 11 for Windows and the desired extra components.

1.3.1. OpenJDK MSI Installer features

The OpenJDK 11 for Windows MSI-based installer includes the following features:

jdk
Java Development Kit (JDK) files.
jdk-registry-standard

Registry keys:

HKLM\Software\JavaSoft\JDK, entries:
    CurrentVersion: 11.0.<update>

HKLM\Software\JavaSoft\JDK\11.0, entries:
    JavaHome: <INSTALLDIR>
    RuntimeLib: <INSTALLDIR>\bin\server\jvm.dll

HKLM\Software\JavaSoft\JDK\11.0.<update>, entries:
    JavaHome: <INSTALLDIR>
    RuntimeLib: <INSTALLDIR>\bin\server\jvm.dll
jdk_env_path
Appends <INSTALLDIR>\bin to the system %PATH% environment variable.
jdk_env_java_home
Sets <INSTALLDIR> to the system %JAVA_HOME% environment variable.
jdk_env_vendor_java_home
Sets <INSTALLDIR> to the system %REDHAT_JAVA_HOME% environment variable.
jdk_registry_jar
Association for JAR files. Launch JAR files with the OpenJDK context menu.
jmc
JDK Mission Control files, installed into <INSTALLDIR>\missioncontrol.
jmc_env
Appends <INSTALLDIR>\missioncontrol to the system %PATH% environment variable.