CentOS7.2安装jdk7u80

时间:2024-01-09 20:20:14

1.cd /usr/local

2.tar zxvf jdk-7u80-linux-x64.tar.gz

3.vi /etc/profile

4.输入i

加入内容如下:

export JAVA_HOME=/usr/local/jdk1.7.0_71

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export PATH=$JAVA_HOME/bin:$PATH

5.加载刚设置的变量

source /etc/profile