JAVA-LINUX下环境变量设置

官网: http://www.oracle.com/

[root@localhost srv]# chmod +x jdk-6u32-linux-i586.bin

[root@localhost srv]# ./jdk-6u32-linux-i586.bin

[root@localhost srv]# mv jdk1.6.0_32 java 

[root@localhost srv]# mv java /usr/

[root@localhost srv]# vim /etc/profile

 

#JAVA

export JAVA_HOME=/usr/java/

export PATH=$JAVA_HOME/bin:$PATH

export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$CLASSPATH

[root@localhost srv]# source  /etc/profile

[root@localhost srv]# java -version

 

 

 

 

本文出自 “hacker1394” 博客,谢绝转载!

你可能感兴趣的:(JAVA-LINUX下环境变量设置)