Linux安装配置JDK8
安装的JDK:jdk-8u102-linux-x64.rpm
下载地址:http://pan.baidu.com/s/1mi8QZeK
安装(JDK默认安装在/usr/java中)
[root@iZ94zsv4mnfZ ~]# rpm -ivh jdk-8u102-linux-x64.rpm
验证
[root@iZ94zsv4mnfZ ~]# java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
[root@iZ94zsv4mnfZ ~]#
配置环境变量
[root@iZ94zsv4mnfZ ~]# vim /etc/profile
文件末尾添加以下内容
export JAVA_HOME=/usr/java/jdk1.8.0_102
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
使配置生效
[root@iZ94zsv4mnfZ ~]# source /etc/profile
相关推荐
farwang 2020-11-25
星愿心愿 2020-11-24
tianhuak 2020-11-24
zhjn0 2020-11-24
昭君出塞 2020-11-23
bluecarrot 2020-11-23
linuxwcj 2020-10-21
以梦为马不负韶华 2020-10-20
彼岸随笔 2020-10-20
yutou0 2020-10-17
applecarelte 2020-10-16
ourtimes 2020-10-16
waterhorse 2020-09-19
MRFENGG 2020-11-11
rainandtear 2020-10-30
kyssfanhui 2020-10-20
liuhangtiant 2020-10-20