删掉/usr/bin/java /usr/bin/javac
ln -s /usr/java/jdk1.5.0 /usr/java/jdk (根据自己的实际目录来做,以下同)
ln -s /usr/java/jdk/bin/java /usr/bin/java
ln -s /usr/java/jdk/bin/javac /usr/bin/javac
修改/etc/profile
在文件最后增加
JAVA_HOME=/usr/java/jdk
PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
export JAVA_HOME
export PATH
export CLASSPATH
阅读(1315) | 评论(0) | 转发(0) |