日期:2014-05-16 浏览次数:20553 次
# cp /media/cdrom/JDK/jdk-1_5_0_15-linux-i586.bin /opt/ # cd /opt # chmod 755 jdk-1_5_0_15-linux-i586.bin # ./jdk-1_5_0_15-linux-i586.bin
JAVA_HOME="/opt/jdk1.5.0_15" export JAVA_HOME CLASSPATH=".:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar" export CLASSPATH PATH="$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH" export PATH
# chmod 755 /etc/profile.d/java.sh
# exit //然后重新登录 # which java /opt/jdk1.5.0_15/bin/java # java -version java version "1.5.0_15" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04) Java HotSpot(TM) Client VM (build 1.5.0_15-b04, mixed mode, sharing) //如果上面红色与实际显示的这部分一制则表明JAVA安装成功,否则安装失败。