首页 > 代码库 > centos7安装ORCLE JAVA
centos7安装ORCLE JAVA
查看JAVA版本
$java -version
系统自带的是JAVA-OPENJDK,需要先卸载
[root@centos ~]# rpm -qa | grep java
javapackages-tools-3.4.1-6.el7_0.noarch
tzdata-java-2014i-1.el7.noarch
java-1.7.0-openjdk-headless-1.7.0.71-2.5.3.1.el7_0.x86_64
java-1.7.0-openjdk-1.7.0.71-2.5.3.1.el7_0.x86_64
python-javapackages-3.4.1-6.el7_0.noarch
卸载OpenJDK,执行以下操作:
[root@centos~]#rpm -e --nodeps tzdata-java-2014i-1.el7.noarch
[root@centos~]# rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.71-2.5.3.1.el7_0.x86_64
[root@centos~]#rpm -e --nodeps java-1.7.0-openjdk-1.7.0.71-2.5.3.1.el7_0.x86_64
安装ORALCE JDK
去ORCLE官网下载jdk-8u45-linux-x64.rpm
下载地址:http://www.oracle.com/technetwork/java/javase/downloads/index.html
[root@centos~]#cd Downloads
[root@centos~]#yum localinstall jdk-8u45-linux-x64.rpm
centos7安装ORCLE JAVA