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

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

Introduction

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

What is java-latest-openjdk

The OpenJDK 16 runtime environment.

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

Install java-latest-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-latest-openjdk using dnf by running the following command:

sudo dnf -y install java-latest-openjdk

Install java-latest-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-latest-openjdk using yum by running the following command:

sudo yum -y install java-latest-openjdk

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

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

sudo dnf remove java-latest-openjdk

java-latest-openjdk Package Contents on Rocky Linux 8

/usr/lib/.build-id
/usr/lib/.build-id/38
/usr/lib/.build-id/38/544d4d880e2260f348b7802bf56af11528effa
/usr/lib/.build-id/ae
/usr/lib/.build-id/ae/2641227be5e23f6a946b5920687451a04fc7a7
/usr/lib/.build-id/e7
/usr/lib/.build-id/e7/a7a86ef557e369c96f8e42b09fbe6313cbfbbe
/usr/lib/jvm/java-16-openjdk-16.0.1.0.9-3.rolling.el8.x86_64/lib/libawt_xawt.so
/usr/lib/jvm/java-16-openjdk-16.0.1.0.9-3.rolling.el8.x86_64/lib/libjawt.so
/usr/lib/jvm/java-16-openjdk-16.0.1.0.9-3.rolling.el8.x86_64/lib/libsplashscreen.so
/usr/share/icons/hicolor/16x16/apps/java-16-openjdk.png
/usr/share/icons/hicolor/24x24/apps/java-16-openjdk.png
/usr/share/icons/hicolor/32x32/apps/java-16-openjdk.png
/usr/share/icons/hicolor/48x48/apps/java-16-openjdk.png

References

Summary

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