Chapter 3. Updating Red Hat build of OpenJDK 17 for Microsoft Windows using the archive
Red Hat build of OpenJDK 17 for Microsoft Windows can be manually update using the archive.
Procedure
- Download the archive of Red Hat build of OpenJDK 17.
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_HOME
environment variable as follows:- Open Command Prompt as an administrator.
Set the value of the environment variable to your Red Hat build of OpenJDK 17 for Microsoft Windows installation path:
C:\> setx /m JAVA_HOME "C:\Progra~1\RedHat\java-17-openjdk-17.0.0.0.35-1"
If the path contains spaces, use the shortened path name.
- Restart Command Prompt to reload the environment variables.
Set the value of
PATH
variable if it is not set already:C:\> setx -m PATH "%PATH%;%JAVA_HOME%\bin";
- Restart Command Prompt to reload the environment variables.
Verify that
java -version
works without supplying the full path.C:\> java -version openjdk version "17" 2021-09-14 LTS OpenJDK Runtime Environment 21.9 (build 17+35-LTS) OpenJDK 64-Bit Server VM 21.9 (build 17+35-LTS, mixed mode, sharing)