运行
javac
如果提示 command not found 就是没安。
或者
rpm -qa | egrep -o "1\.[6-8]\.0-openjdk| uniq"
如果有返回值,那么就是装了。
第一种方法最快。