Este contenido no está disponible en el idioma seleccionado.
Chapter 3. Updating Red Hat build of OpenJDK 21 for Microsoft Windows using the archive
Red Hat build of OpenJDK 21 for Microsoft Windows can be manually updated using the archive.
Procedure
- Download the archive of Red Hat build of OpenJDK 21.
Extract the contents of an archive to a directory of your choice.
NoteExtracting the contents of an archive to a directory path that does not contain spaces is recommended.
On Command Prompt, update
JAVA_HOMEenvironment variable as follows:- Open Command Prompt as an administrator.
Set the value of the environment variable to your Red Hat build of OpenJDK 21 for Microsoft Windows installation path:
setx /m JAVA_HOME "C:\Progra~1\RedHat\java-21-openjdk-<version>"
C:\> setx /m JAVA_HOME "C:\Progra~1\RedHat\java-21-openjdk-<version>"Copy to Clipboard Copied! Toggle word wrap Toggle overflow If the path contains spaces, use the shortened path name.
- Restart Command Prompt to reload the environment variables.
Set the value of
PATHvariable if it is not set already:setx -m PATH "%PATH%;%JAVA_HOME%\bin";
C:\> setx -m PATH "%PATH%;%JAVA_HOME%\bin";Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Restart Command Prompt to reload the environment variables.
Verify that
java -versionworks without supplying the full path.java -version
C:\> java -versionCopy to Clipboard Copied! Toggle word wrap Toggle overflow