CentOS 安装jdk71、下载jdk??http://www.Oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html?
选择jdk-7u75-linux-x64.rpm?
2、安装jdk?新建目录?mkdir /usr/java?
切换到下载目录 将下载的文件copy到/usr/java? cp jdk-7u75-linux-x64.rpm /usr/java?
切换到/usr/java?修改权限chmod +x jdk-7u75-linux-x64.rpm?
运行rpm -ivh jdk-7u75-linux-x64.rpm
3、环境变量配置?vi /etc/PRofile
在最后添加:?
#set java environment
export JAVA_HOME=/usr/java/jdk1.7.0_75
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/binexport JAVA_HOME CLASSPATH PATH?
保存退出:x?
启用环境变量配置:source /etc/profile
?建立连接:?
cd /usr/bin
ln -s -f /usr/java/jdk1.7.0_75/jre/bin/java
ln -s -f /usr/java/jdk1.7.0_75/bin/javac?
4、检测?java -version? javac?