Download and Extract
1,Get the latest version from Java.com.
Make sure you get the Linux (self-extracting file) and NOT the RPM!
2,Open a terminal and become root, then move the file you downloaded into /opt
3,Execute the file.
sh jre*.bin
4,Read the EULA and type “yes” if you agree to it
Setup Java Systemwide
1,Run this command as root in the terminal window:
vi/etc/profile.d/java.sh
2,Insert these lines:
export J2RE_HOME=/opt/jre1.6.0_01
export PATH=$J2RE_HOME/bin:$PATH
3,Run these commands:
#source /etc/profile.d/java.sh
#/usr/sbin/alternatives --install /usr/bin/java java /opt/jre1.6.0_01/bin/java 2
#/usr/sbin/alternatives --config java
4,Type “2″ then “Enter”.
So much for this.
twm_scrit 于 2015-07-25 14:51:49发表:
加油