Install and Config Sun Java Runtime Environment: How-to.
[ http://www.liulantao.com/ ]
 
First, get the latest jre from SUN and get the rpm.
Go-to http://java.com/en/download/manual.jsp, and choose the rpm file.

Then install it using rpm
[lax@liulantao-com JAVA]$ sudo rpm -Uvh jre-6u12-linux-i586.rpm

Make the system recognize it.
[lax@liulantao-com ~]$ sudo /usr/sbin/alternatives --install /usr/bin/java java /usr/java/jre1.6.0_12/bin/java 100 --slave /usr/bin/rmiregistry rmiregistry /usr/java/jre1.6.0_12/bin/rmiregistry --slave /usr/share/man/man1/rmiregistry.1 rmiregistry.1 /usr/java/jre1.6.0_12/man/man1/rmiregistry.1 --slave /usr/share/man/man1/rmiregistry.1.gz rmiregistry.1.gz /usr/java/jre1.6.0_12/man/man1/rmiregistry.1.gz

Then we check the default version. See it, java is there waiting for U!
[lax@liulantao-com JAVA]$ java -version
java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode, sharing)

--
Liu Lantao
College of Information Science and Technology, Beijing Normal University
EMAIL: liulantao ( at ) gmail ( dot ) com ;
WEBSITE: http://www.liulantao.com/ .
------

公众号推荐

知识分享行动
每天 10:24
只聊技术细节
扫码立即参与
知识分享行动