This article will show you how to install JDK17 on RHEL8 Server
Run install command
sudo dnf install java-17-openjdk
# Example output
Installed:
java-17-openjdk-1:17.0.6.0.10-3.el8_7.x86_64 java-17-openjdk-headless-1:17.0.6.0.10-3.el8_7.x86_64
Verify installed java SDKs
java -version
# Example output
openjdk version "11.0.18" 2023-01-17 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.18.0.10-2.el8_7) (build 11.0.18+10-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.18.0.10-2.el8_7) (build 11.0.18+10-LTS, mixed mode, sharing)
# List installed jdk
sudo dnf list installed "java*"
# Example output:
java-11-openjdk.x86_64 1:11.0.18.0.10-2.el8_7 @rhel-8-for-x86_64-appstream-rpms
java-11-openjdk-devel.x86_64 1:11.0.18.0.10-2.el8_7 @rhel-8-for-x86_64-appstream-rpms
java-11-openjdk-headless.x86_64 1:11.0.18.0.10-2.el8_7 @rhel-8-for-x86_64-appstream-rpms
java-17-openjdk.x86_64 1:17.0.6.0.10-3.el8_7 @rhel-8-for-x86_64-appstream-rpms
java-17-openjdk-headless.x86_64 1:17.0.6.0.10-3.el8_7 @rhel-8-for-x86_64-appstream-rpms
javapackages-filesystem.noarch 5.3.0-1.module+el8+2447+6f56d9a6 @rhel-8-for-x86_64-appstream-rpms