Chapter 3. Updating OpenJDK 11 for Windows using the archive

OpenJDK 11 for Windows can be manually update using the archive.

Procedure

  1. Download the archive of OpenJDK 11.
  2. Extract the contents of an archive to a directory of your choice.

    Note

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

  3. On Command Prompt, update 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.
  4. Set the value of PATH variable if it is not set already:

      C:\> setx -m PATH "%PATH%;%JAVA_HOME%\bin";
  5. Restart Command Prompt to reload the environment variables.
  6. Verify that java -version works without supplying the full path.

    C:\> java -version
    openjdk version "11.0.3" 2019-04-16 LTS
    OpenJDK Runtime Environment (build 11.0.3+7-LTS)
    OpenJDK 64-bit Server VM (build 11.0.3+7-LTS, mixed mode)