This topic describes the installation procedures of the JDK on the Linux platform, along with the system requirements.
General Notes About Installing the JDK on Linux Platforms from Archive FilesThis topic describes general information about installing JDK
17on Linux platforms.
Installing the JDK automatically creates a directory called jdk–feature.interim.update.patch
where feature (17),interim, update,
and patch
represent corresponding values of version information.
Root Access
If you install JDK in a specific location such as /opt
, you must log in with root credentials to gain the necessary permissions. If you do not have the root access, either install the JDK in your home directory or a sub directory for which you have the write permissions.
Overwriting Files
If you install the software in a directory that contains a sub directory named jdk–17.interim.update.patch
, the new software overwrites files of the same name in that directory. Ensure that you rename the old directory if it contains files that you would like to keep.
System Preferences
Installing the JDK from archive files doesn't configure the backing store for the system node of Java Preferences API (java.util.prefs
Java package). If this functionality of the JDK is required, you need to manually configure it by making sure either /etc/.java/.systemPrefs
or jdk–17.interim.update.patch/.systemPrefs
directory exists.
This topic describes general information about installing JDK 17 from RPM packages on Linux platforms.
You can install only one version of JDK of the same feature release. If you try to install the newer version of the same feature release while the older version exists, the installer uninstalls the older version and installs the new version. For example, you can't install jdk-17
and jdk-17.0.1
simultaneously. If you attempt to install jdk-17.0.1
after jdk-17
is installed, the installer uninstalls jdk-17
and installs jdk-17.0.1
.
Every update release will be installed in a separate directory, such as /usr/lib/jvm/jdk-<VERSION>-oracle-<ARCH>
directory, where <VERSION> is a full version string (example: 23, 23.0.1), <ARCH>
equals x64
or aarch64
. Additionally /usr/java/jdk-17
symbolic link that is pointing to the installation directory is created for backward compatibility.
Note:
Root Access
You must log in with root credentials to install or update JDK.
System Preferences
By default, the installation script configures the system such that the backing store for the system node of Java Preferences API (java.util.prefs Java package) is configured in /etc/.java/.systemPrefs
directory.
System Integration
The JDK installation is integrated with the alternatives framework. After installation, the alternatives framework is updated to reflect the binaries from the recently installed JDK. Java commands such as java
, javac
, javadoc
, and javap
can be called from the command line.
Using the java -version
command, you can confirm the default (recently installed) JDK version.
In addition, you can check which specific RPM package provides the
java
files:
$ rpm -q --whatprovides java
System Requirements for Installing JDK on Linux Platforms JDK Installation Instruction Notation for Linux Platforms
JDK installers now support only one version of any Java feature release. You can't install multiple versions of the same feature release.
For example, you can't install
jdk-17
and
jdk-17.0.1
simultaneously. If you attempt to install
jdk-17.0.1
after
jdk-17
is installed, the installer uninstalls
jdk-17
and installs
jdk-17.0.1
.
Note:
Linux x64 systems: jdk-<FEATURE>_linux-x64_bin.tar.gz
This string becomes:
jdk-17_linux-x64_bin.tar.gz
Linux aarch64 (64-bit ARM) systems: jdk-<FEATURE>_linux-aarch64_bin.tar.gz
This string becomes:
jdk-17_linux-aarch64_bin.tar.gz
Installing the JDK on Linux from Archive Files, Debian Packages, RPM Packages, and Oracle Linux Repositories
You can install the JDK on a Linux platform from archive files, debian packages, downloadable Red Hat Package Manager (RPM) packages files, or RPM packages from Oracle Linux (OL) repositories.
Installation can be performed by using one of the following processes:
From archive files (.tar.gz
): This allows you to install a private version of the JDK for the current user into any location, without affecting other JDK installations. However, it may involve manual steps to get some of the features to work. See the following table for the options available for downloading and installing the JDK from archive files. The bundles are available for Linux x64 and Linux aarch64 (64-bit ARM) systems. Install the required bundle.
.deb
): This allows you to perform a system-wide JDK installation on Debian-based Linux platforms, and requires root access.From downloadable RPM packages (.rpm
): This allows you to perform a system-wide JDK installation on RPM-based Linux platforms for all users, and requires root access. See the following table for the options available for downloading and installing the JDK from Linux x64 and Linux aarch64 (64-bit ARM) RPM packages.
From Oracle Linux repositories: This allows you to perform a system-wide JDK installation on OL platforms starting from OL7 for all users, and requires root access. JDK RPM packages in Oracle Linux RPM repositories are available for x64 and aarch64 (64-bit ARM) OL platforms. Explicit download of JDK RPM packages is not required, the package manager will do it automatically for you.
JDK RPM packages for Generic Linux platforms and Oracle Linux platforms differ. The following table lists the differences:
Table 3-1 Difference between Generic Linux and OL platforms
Feature Downloadable JDK RPM Package for Generic Linux Platforms JDK RPM package for Oracle Linux platforms Supported Linux Platforms Any RPM-based Linux platform. For example, Red Hat, SuSE OL platforms starting from OL7 Package name JDK image is packed in a single package namedjdk-17
JDK image is split into two packages: jdk-17-headless
and jdk-17-headful
.
jdk-17-headless
is a headless Java Runtime for running non-GUI applications.jdk-17-headful
is headful Java Runtime and Development Tools for developing and running all types of applications.jdk-17-headful
package requires jdk-17-headless
package. When these packages are installed together, they provide the same functionality as the jdk-17
package for Generic Linux Platforms.
/usr/lib/jvm/jdk-17-oracle-<ARCH>
/usr/lib/jvm/jdk-17-oracle-<ARCH>
Available for download from Java SE Downloads Yes No. The packages are hosted in Oracle Linux RPM repositories. Integration with the alternatives framework jdk-17
package registers java
and javac
groups with the alternatives framework.
jdk-17-headless
package registers java
group with the alternatives framework.
jdk-17-headful
package registers javac
group with the alternatives framework.
Downloading the JDK Installer
Access Java SE Downloads page and click Accept License Agreement. Under the Download menu, click the Download link corresponding your requirement.
The following table lists the options and instructions for downloading and installing the JDK 17 release on a Linux platform:
Installing the 64-Bit JDK on Linux PlatformsYou can install the JDK for 64-bit Linux from an archive file (.tar.gz
). The .tar.gz
archive file (also called a tarball) is a file that can be uncompressed and extracted in a single step.
To install the 64-bit JDK on a Linux platform:
jdk-17.interim.update.patch_linux-x64_bin.tar.gz
. For example jdk-17_linux-x64_bin.tar.gz
jdk-17.interim.update.patch_linux-aarch64_bin.tar.gz
. For example, jdk-17_linux-aarch64_bin.tar.gz
Before you download a file, you must accept the license agreement. Anyone (not only root users) can install the archive file in any location having write access.
.tar.gz
archive file to the current directory. $ tar zxvf jdk-17_linux-x64_bin.tar.gz
OR
$ tar zxvf jdk-17_linux-aarch64_bin.tar.gz
The Java Development Kit files are installed in a directory named jdk-17.interim.update.patch
.
.tar.gz
file if you want to save disk space.You can install the JDK Debian package for 64-bit Linux from the (.deb
) file.
To install the 64-bit JDK Debian package on a Linux platform:
jdk-17.interim.update.patch_linux-x64_bin.deb
. For example jdk-17_linux-x64_bin.deb
Before you download a file, you must accept the license agreement. Anyone (not only root users) can install the archive file in any location having write access.
$ sudo dpkg -i jdk-17_linux-x64_bin.deb
The Java Development Kit files are installed into /usr/lib/jvm/jdk-<VERSION>-oracle-<ARCH>
directory. For example, JDK 17 releases for x64 will be installed in /usr/lib/jvm/jdk-17-oracle-x64
directory.
.deb
file if you want to save disk space.You can install the JDK on 64-bit RPM-based Linux platforms, such as Red Hat and SuSE by using a downloadable RPM package file (.rpm
) in the system location.
Ensure that you have the root user access. You can do this by running the command su
and entering the superuser password.
To install the 64-bit JDK on an RPM-based Linux platform:
jdk-17.interim.update.patch_linux-x64_bin.rpm
. For example, jdk-17_linux-x64_bin.rpm
jdk-17.interim.update.patch_linux-aarch64_bin.rpm
. For example, jdk-17_linux-aarch64_bin.rpm
Before you download a file, you must accept the license agreement.
$ sudo rpm -ivh jdk-17_linux-x64_bin.rpm
OR
$ sudo rpm -ivh jdk-17_linux-aarch64_bin.rpm
Upgrade the required package using the following command:
$ sudo rpm -Uvh jdk-17_linux-x64_bin.rpm
OR
$ sudo rpm -Uvh jdk-17_linux-aarch64_bin.rpm
Note:
JDK
17can coexist with other feature releases of JDK. For each version release, a separate directory is created, the default directory being
/usr/lib/jvm/jdk-<VERSION>-oracle-<ARCH>
. For example, JDK
17releases for x64 will be installed in
/usr/lib/jvm/jdk-17-oracle-x64
directory.
.rpm
file if you want to save disk space.
It is not required to reboot.
From JDK version 8, the JDK RPMs are signed with OL keys. RPMs installed on Linux distributions other than OL may display a warning message indicating that security validation of the package failed. This indicates that the public key used to sign this RPM needs to be installed in the system.
A sample warning message and the public key installation steps are as follows:
Sample Warning Message
jdk-17.0.11_linux-aarch64_bin.rpm: Header V3 RSA/SHA256 Signature, key
ID ec551f03: NOKEY
Installation Steps
wget
https://yum.oracle.com/RPM-GPG-KEY-oracle-ol9
sudo rpm --import RPM-GPG-KEY-oracle-ol9
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4