jdk更新至1.8
===========================================================================================
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
-----------------------------------------------------------------------------------
[[email protected] ~]# rpm -qa |grep jdk
java-1.7.0-openjdk-1.7.0.131-2.6.9.0.el6_8.x86_64
java-1.6.0-openjdk-1.6.0.41-1.13.13.1.el6_8.x86_64
[[email protected] ~]# rpm -qa | grep gcj
[[email protected] ~]# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.131-2.6.9.0.el6_8.x86_64
[[email protected] ~]# yum remove java-1.6.0-openjdk-1.6.0.41-1.13.13.1.el6_8.x86_64
[[email protected] ~]# java -version
-bash: java: command not found
[[email protected] ~]# tar xf jdk-8u144-linux-x64.gz -C /usr/local/
[[email protected] ~]# ls /usr/local/
bin etc games include jdk1.8.0_144 lib lib64 libexec sbin share src
[[email protected] ~]# vim /etc/profile.d/java.sh
JAVA_HOME=/usr/local/jdk1.8.0_144
PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME
export PATH
export CLASSPATH
[[email protected] ~]#
[[email protected] ~]# source /etc/profile.d/java.sh
[[email protected] ~]# java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
*******************************************************************************************
===========================================================================================
本文出自 “12478125” 博客,請務必保留此出處http://12488125.blog.51cto.com/12478125/1972003
jdk更新至1.8