chmod +x jdk-6u21-linux-x64.bin
./jdk-6u45-linux-x64.bin
export JAVA_HOME=/home/software/jdk1.6.0_45 export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:$JAVA_HOME/bin
执行 source /etc/profile 是配置立即生效
export JAVA_HOME=/home/software/jdk1.6.0_45 export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:$JAVA_HOME/bi
[root@localhost jdk1.6.0_45]# java -version java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
在 64 位 linux 机器上安装 jdk1.6 jdk-6u45-linux-x64.bin的安装
原文地址:http://blog.csdn.net/liubinblog/article/details/42399331