Installation of the 64-bit JDK on RPM-based Linux Platforms
This procedure installs the Java Development Kit (JDK) for 64-bit RPM-based Linux platforms, such as Red Hat and SuSE, using an RPM binary file (.rpm
) in the system location. You must be root to perform this installation.
These instructions use the following file:
jdk-8uversion-linux-x64.rpm
-
Download the file.
Before the file can be downloaded, you must accept the license agreement.
-
Become root by running
su
and entering the super-user password. -
Uninstall any earlier installations of the JDK packages.
# rpm -e package_name
-
Install the package.
# rpm -ivh jdk-8uversion-linux-x64.rpm
To upgrade a package:
# rpm -Uvh jdk-8uversion-linux-x64.rpm
-
Delete the
.rpm
file if you want to save disk space. -
Exit the root shell. No need to reboot.
Starting with version 8u40, the JDK installation is integrated with the alternatives framework and 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 invoked from the command line.
Using the java -version
command, users can confirm the default (recently installed) JDK version.
In addition, users can now check which specific RPM package provides the java files:
rpm -q --whatprovides java