How To Install java-11-openjdk on Rocky Linux 8

In this tutorial we learn how to install java-11-openjdk on Rocky Linux 8. java-11-openjdk is OpenJDK 11 Runtime Environment

Introduction

In this tutorial we learn how to install java-11-openjdk on Rocky Linux 8.

What is java-11-openjdk

The OpenJDK 11 runtime environment.

We can use yum or dnf to install java-11-openjdk on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install java-11-openjdk.

Install java-11-openjdk on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install java-11-openjdk using dnf by running the following command:

sudo dnf -y install java-11-openjdk

Install java-11-openjdk on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install java-11-openjdk using yum by running the following command:

sudo yum -y install java-11-openjdk

How To Uninstall java-11-openjdk on Rocky Linux 8

To uninstall only the java-11-openjdk package we can use the following command:

sudo dnf remove java-11-openjdk

java-11-openjdk Package Contents on Rocky Linux 8

/usr/lib/.build-id
/usr/lib/.build-id/09
/usr/lib/.build-id/09/ac92220bd0274079eebbda8ab0541017cef03d
/usr/lib/.build-id/2b
/usr/lib/.build-id/2b/0b984c4af2f4bb60f500c7dfcbba75bba7916f
/usr/lib/.build-id/62
/usr/lib/.build-id/62/c2230135542cc3b39bbbe2b686fc440943dcbc
/usr/lib/jvm/java-11-openjdk-11.0.11.0.9-2.el8_4.x86_64/lib/libawt_xawt.so
/usr/lib/jvm/java-11-openjdk-11.0.11.0.9-2.el8_4.x86_64/lib/libjawt.so
/usr/lib/jvm/java-11-openjdk-11.0.11.0.9-2.el8_4.x86_64/lib/libsplashscreen.so
/usr/share/icons/hicolor/16x16/apps/java-11-openjdk.png
/usr/share/icons/hicolor/24x24/apps/java-11-openjdk.png
/usr/share/icons/hicolor/32x32/apps/java-11-openjdk.png
/usr/share/icons/hicolor/48x48/apps/java-11-openjdk.png
/usr/lib/.build-id
/usr/lib/.build-id/ac
/usr/lib/.build-id/ac/631e7389471e03713bd41f0dbcef32078af79f
/usr/lib/.build-id/c0
/usr/lib/.build-id/c0/2ebbb4f505acf45a1acd6522f32f445e9354b2
/usr/lib/.build-id/d7
/usr/lib/.build-id/d7/929deecc5c7ada29492e033d313d099812e421
/usr/lib/jvm/java-11-openjdk-11.0.12.0.7-0.el8_4.x86_64/lib/libawt_xawt.so
/usr/lib/jvm/java-11-openjdk-11.0.12.0.7-0.el8_4.x86_64/lib/libjawt.so
/usr/lib/jvm/java-11-openjdk-11.0.12.0.7-0.el8_4.x86_64/lib/libsplashscreen.so
/usr/share/icons/hicolor/16x16/apps/java-11-openjdk.png
/usr/share/icons/hicolor/24x24/apps/java-11-openjdk.png
/usr/share/icons/hicolor/32x32/apps/java-11-openjdk.png
/usr/share/icons/hicolor/48x48/apps/java-11-openjdk.png

References

Summary

In this tutorial we learn how to install java-11-openjdk on Rocky Linux 8 using yum and dnf.