卸载原系统上的JDK:
[root@admin ~]# java -version
查看需要卸载的JDK清单:
[root@admin ~]# rpm -qa | grep java
java-1.6.0-openjdk-1.6.0.0-1.45.1.11.1.el6.x86_64
卸载OpenJDK,执行以下操作:
[root@admin ~]# rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-1.45.1.11.1.el6.x86_64
安装JDK:
[root@admin local]# rpm -ivh ****.rpm
验证安装:
[root@admin bin]# java
[root@admin bin]# javac
[root@admin bin]# java -version