First, download the latest version of JRE rpm from the Oracle website. To download the latest version of JRE Click Here. The process of installing the JRE rpm and setting the JAVA_HOME path is shown here.
Install JRE on 64-bit Linux
-
Download the latest JRE rpm from here, select the 64-bit rpm in my case rpm is jre-8u91-linux-x64.rpm.
- Login as a root user and install the rpm through the command shown below:
[root@testserver ~]# rpm -ivh jre-8u91-linux-x64.rpm
- Once rpm is installed successfully then set the path through bash_profile, to set the path open the bash_profile in vi editor, add the paths and save the file.
[root@testserver jre1.8.0_91]# vi ~/.bash_profile
- Run the command source~/.bash_profile to take these paths into effect.
[root@testserver jre1.8.0_91]# source ~/.bash_profile
- Now verify the set paths using the below commands
[root@testserver jre1.8.0_911]# echo $JAVA_HOME
/usr/java/jre1.8.0_91/
[root@testserver jre1.8.0_91]# echo $PATH
/usr/java/jre1.8.0_91/bin:/root/bin