이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 4. Updating Red Hat build of OpenJDK 21 on Red Hat Enterprise Linux
The following sections provide instructions for updating Red Hat build of OpenJDK 21 on Red Hat Enterprise Linux.
4.1. Updating Red Hat build of OpenJDK 21 on RHEL by using yum 링크 복사링크가 클립보드에 복사되었습니다!
You can update the installed Red Hat build of OpenJDK packages by using the yum
system package manager.
Prerequisites
- You must have root privileges on the system.
Procedure
Check the current Red Hat build of OpenJDK version:
sudo yum list installed "java*"
$ sudo yum list installed "java*"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow A list of installed Red Hat build of OpenJDK packages displays.
Update a specific package. For example:
sudo yum update java-21-openjdk
$ sudo yum update java-21-openjdk
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the update worked by checking the current Red Hat build of OpenJDK versions:
java -version
$ java -version
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteYou can install multiple major versions of Red Hat build of OpenJDK on your local system. If you need to switch from one major version to another major version, issue the following command in your command-line interface (CLI) and then follow the onscreen prompts:
sudo update-alternatives --config 'java'
$ sudo update-alternatives --config 'java'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
4.2. Updating Red Hat build of OpenJDK 21 on RHEL by using an archive 링크 복사링크가 클립보드에 복사되었습니다!
You can update Red Hat build of OpenJDK by using an archive file. This is useful if the Red Hat build of OpenJDK administrator does not have root privileges.
Prerequisites
-
Know the generic path pointing to your JDK or JRE installation. For example,
~/jdks/java-21
Procedure
Remove the existing symbolic link of the generic path to your JDK or JRE.
For example:
unlink ~/jdks/java-21
$ unlink ~/jdks/java-21
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Install the latest version of the JDK or JRE in your installation location.