1.修改了/etc/profile的环境变量,在最后加了
export JAVA_HOME=/opt/jdk1.6.0_37
export PATH=/usr/local/openssl/bin:$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
2.source /etc/profile
3.在etc目录下JAVA_HOME和别的目录的不一样,这是为什么呢
[root@HS_ICMS01 etc]# pwd
/etc
[root@HS_ICMS01 etc]# set|grep JAVA
JAVA_HOME=/opt/jdk1.6.0_37
==============================
[root@HS_ICMS01 tomcat]# pwd
/opt/onewave/ices/tomcat
[root@HS_ICMS01 tomcat]# set|grep JAVA
JAVA_HOME=/opt/jdk1.5.0_16
偶然的你
BIG阳