Even though OpenJDK is available in Linux repositories, some
applications strictly require Oracle Java Development Kit. This article
shows you how to manually install Oracle JDK $java_version on your Linux
system. This article uses JDK $java_version$java_update_no to
demonstrate the installation. In the provided commands, replace the
version specific paths and file names according to your downloaded
version.
Version specific installation guides are available here:
Version specific installation guides are available here:
-
Install Oracle JDK 8 on Linux
- Install Oracle JDK 11 on Linux
- Install Oracle JDK 17 on Linux
-
Install Oracle JDK 19 on Linux
(The latest version)
-
Install the latest Oracle JDK on Linux
(Permanent link to install the latest version)
If your Linux distribution is using DEB package format like Debian, you can download and install the jdk-$java_version_linux-x64_bin.deb file using the following command:
sudo dpkg -i jdk-$java_version_linux-x64_bin.deb
If your Linux distribution is using RPM package format like Cent
OS, you can download and install the
jdk-$java_version_linux-x64_bin.rpm file using the
following command:sudo rpm -ivh jdk-$java_version_linux-x64_bin.rpm
However, this article explains the manual installation method which is applicable for all Linux distributions out there. Personally, I prefer the manual installation because I have more control over the changes made in the system.


