How to Install Oracle JDK 8 on Rocky Linux 8

How to download the correct Oracle JDK version and install it on your Rocky Linux. This software is not open-source (as OpenJDK).

The Java Development Kit (JDK) is a distribution of Java Technology by Oracle Corporation.

This software is not open-source (as OpenJDK). The license permits certain uses, such as personal use and development use, at no cost. For other uses, a commercial license is required.

Some software work perfectly with OpenJDK, others require Oracle JDK (or at least are only certified with it).

How to download Oracle JDK

That’s easy! Just get it from this link:
For Rocky Linux, download the x64 RPM Package (or x86 RPM Package if you installed the 32bit system)

How to install Oracle JDK on Rocky Linux

All you need to do is install the RPM package you downloaded with a command like this:

sudo rpm -ivh jdk-8u321-linux-x64.rpm

Now let’s see if it works:

java -version

You should get something like this:

java version "1.8.0_321"
Java(TM) SE Runtime Environment (build 1.8.0_321-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.321-b07, mixed mode)


Leave a Reply