1、jdk1.8下载地址 http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.rpm 2、检查系统有没有自带open-jdk yum list installed |grep java rpm -qa|grep jdk 3、卸载openjdk: yum -y remove java java-1.7.0-openjdk* rpm -e 4、安装下载的JDK1.8版本 rpm -ivh jdk-8u151-linux-x64.rpm 5、查看刚安装的Java版本信息 java -version