How to install Oracle JDK RPM in Oracle Linux 8.5

The installation of a JDK is something required during the installation of many Oracle products. It is sometimes included with some of them but I wanted to have a standalone installation from the official Oracle RPM instead of having to use an existing one. I have documented all the steps in this page in case you need to do it too.

Java Installation
Java Installation

The first step was to download the proper JDK package from Oracle Java Downloads website. I chose the x64 RPM Linux Package because I wanted to install the RPM in an existing Oracle Linux 8.5 VM.

Download x64 RPM Package from Oracle Java Downloads website
Download x64 RPM Package from Oracle Java Downloads website

I had downloaded the RPM using the host computer so I copied the file in the folder I had previously configured as the shared folder between the host and the VM. This folder was available as “/media/sf_SharedFolder/” in the VM machine. I logged in as root and I used the “cd /media/sf_SharedFolder/” command to change the current directory to this folder.

cd /media/sf_SharedFolder/
cd /media/sf_SharedFolder/

Them I used the “yum -y localinstall jdk-18_linux-x64_bin.rpm” command to install the package with yum:

yum -y localinstall jdk-18_linux-x64_bin.rpm
yum -y localinstall jdk-18_linux-x64_bin.rpm

The installation started…

installing...
installing…

And it completed successfully after a few tens of seconds:

Installation completed
Installation completed

I executed the command “which java” to identify the java executable location and it was a link to “/etc/alternatives/java” that resulted being an other link to “/usr/java/jdk-18.0.1/bin/java“.

Identify JDK installation folder
Identify JDK installation folder

The JDK was therefore installed in “/usr/java/jdk-18.0.1“, I took a note of the path in case I would have to use it in further software installations. As you can see, the installation Oracle’s JDK was pretty straightforward and presented no difficulties.

Disclaimer

The information contained in this Website is for general information purposes only. We try to keep this information up to date and correct but we make no warranties of any kind about the completeness, accuracy, reliability with respect to the website, the information or the graphics contained on the website for any purpose. Any reliance you place on such information is strictly at your own risk. In no event will we be liable for any loss or damage whatsoever from the use of this Website.

The post How to install Oracle JDK RPM in Oracle Linux 8.5 appeared first on MyBIJourney

All trademarks are properties of their respective owners.
FacebookTwitterPinterestWhatsAppMail