Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 2. Installing Red Hat build of OpenJDK 21 for Microsoft Windows with the archive


This procedure describes how to manually install Red Hat build of OpenJDK 21 for Microsoft Windows using the archive.

Procedure

  1. Download the archive of Red Hat build of OpenJDK 21 for Microsoft Windows.
  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. Update the PATH as below:

    1. Add the bin directory contained in your Red Hat build of OpenJDK 21 for Microsoft Windows installation path to the %PATH% environment variable:

      C:\> setx /m PATH "%PATH%;C:\Progra~1\RedHat\java-21-openjdk-<version>\bin"

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

    2. Restart Command Prompt to reload the environment variables.
  4. To verify the Red Hat build of OpenJDK 21 for Microsoft Windows is successfully installed, run the java -version command in a command prompt.
  5. 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 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.
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2026 Red Hat
Retour au début