Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.作者: dal2020 时间: 2012-4-16 21:29
假如把JDK1.7安装在/usr/local/jdk1.7下,执行vi /etc/profile进入文件后,在PATH前面添加如下变量export JAVA_HOME=/usr/local/jdk1.7
export CLASSPATH=$JAVA_HOME/lib/
PATH=$JAVA_HOME/binPATH
保存文件退出/etc/profile
再执行source /etc/profile
执行java -version
看一看是否是jdk1.7?作者: royz 时间: 2012-4-17 23:38
已执行vi /etc/profile 并修改了正确的路径如下: