Search

Chapter 3. Updating Red Hat build of OpenJDK 21 for Microsoft Windows using the archive

download PDF

Red Hat build of OpenJDK 21 for Microsoft Windows can be manually updated using the archive.

Procedure

  1. Download the archive of Red Hat build of OpenJDK 21.
  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 Red Hat build of OpenJDK 21 for Microsoft Windows installation path:

      C:\> setx /m JAVA_HOME "C:\Progra~1\RedHat\java-21-openjdk-<version>"

      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
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.