直接命令行登录远程服务器 rpm -qa | grep openjdk | xargs yum -y remove rpm -qa | grep java rpm -qa | grep jdk yum remove jdk1.7.0