一、下載jdk源碼版http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.htmlhtml
二、解壓到/usr/local/jdkjava
三、配置環境oracle
vi /etc/profile測試
export JAVA_HOME=/usr/local/jdkhtm
export JRE_HOME=${JAVA_HOME}/libget
export CLASSPATH=".:${JAVA_HOME}/lib:${JRE_HOME}/lib源碼
export PATH=${JAVA_HOME}/bin:$PATHio
四、測試是否配置成功java -versionjdk