- Wget the rpm package from http://www.java.com/en/download/manual.jsp#lin
- Install the package
[root@vm src]# rpm -Uvh jre-7u7-linux-x64.rpm
Preparing... ########################################### [100%]
package jre-1.7.0_07-fcs.x86_64 is already installed - Update alternatives for java
[root@vm src]# update-alternatives --install /usr/bin/java java /usr/java/jre1.7.0_07/bin/java 3
- configure java version using alternatives
[root@vm src]# alternatives --config java
There are 3 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
2 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
3 /usr/java/jre1.7.0_07/bin/java
Enter to keep the current selection[+], or type selection number: 3 - Verify the java version
[root@vm src]# java -version
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
- 8 Users Found This Useful
Related Articles
Powered by WHMCompleteSolution