Linux下安装JDK
1.下载.rpm安装文件,用rpm -qa| grep jdk查看当前安装的JDK版本,rpm -e jdk...卸载
2.安装jdk,rpm -ivh jdk....rpm
3.编辑/etc/profile文件,配置环境变量
export JAVA_HOME=/usr/java/jdk1.7.0_60
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
4.source /etc/profile立即生效