(1)下载jdk
jdk-1_5_0_09-linux-i586.bin
(2)安装jdk
shell> ./jdk-1_5_0_09-linux-i586.bin
shell> ln -s jdk-1_5_0_09 java
(3)设置环境变量shell> vi /etc/profile
添加以下内容:
JAVA_HOME=/usr/local/java
JRE=$JAVA_HOME/jre
PATH=$JAVA_HOME/bin:$JRE/bin:$PATH
CLASSPATH=.:$JAVA_HOME/bin/tools.jar:$JAVA_HOME/lib/dt.jar
export JAVA_HOME JRE CLASSPATH PATH