centos7 解除安裝openJDK 安裝jdk7

振宇要低調發表於2016-06-26
[root@cms02 root]# rpm -qa | grep jdk
java-1.7.0-openjdk-headless-1.7.0.75-2.5.4.2.el7_0.x86_64
java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64
[root@cms02 root]# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.75-2.5.4.2.el7_0.x86_64
[root@cms02 root]# rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.75-2.5.4.2.el7_0.x86_64
[root@cms02 root]# java -version
-bash: /usr/bin/java: 沒有那個檔案或目錄
[root@cms02 root]# rpm -ivh jdk-7u45-linux-x64.rpm 
準備中...                          ################################# [100%]
正在升級/安裝...
   1:jdk-2000:1.7.0_45-fcs            ################################# [100%]
Unpacking JAR files...
    rt.jar...
    jsse.jar...
    charsets.jar...
    tools.jar...
    localedata.jar...
    jfxrt.jar...
[root@cms02 root]# java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

 

相關文章