标签:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html?
选择jdk-7u75-linux-x64.rpm?
新建目录? 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
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?
java -version? javac?
标签:
原文地址:http://www.cnblogs.com/downthreelan/p/4379013.html