Setup Oracle Java jre 1.7 on Centos 6.(1,2,3,4…)

Download the rpm file from java.com. Install using the rpm command:

rpm -Uvh jre-7u17-linux-x64.rpm

Use alternatives to config:

[root@localhost ~]# alternatives --config java
There are 2 programs which provide 'java'.
  Selection    Command
-----------------------------------------------
*  1           /usr/java/latest/jre/bin/java
 + 2           /usr/java/jre1.7.0_17/bin/java
   
Enter to keep the current selection[+], or type selection number:

Select the java you want to use in my case 2. Test using:

[root@localhost ~]# java -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
[root@localhost ~]# 

Create links in the Mozilla Plugins directory:

[root@localhost ~]# cd /usr/lib64/mozilla/plugins/
[root@localhost ~]# ln -fs /usr/java/latest/lib/amd64/libnpjp2.so 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Scroll to top