Method 1: You can view it through the [java -version] command. If the output information displays the jdk version number, it means that java
java -version
# is installed
rpm -qa | grep java
The above is the detailed content of How to check whether java is installed in centos. For more information, please follow other related articles on the PHP Chinese website!