Some RPMs (e.g. jpackage.org’s tomcat7-7.0.39-1.jpp6.noarch.rpm
) express their dependency upon Java by requiring a RPM that provides capability java
(as opposed to, for example, depending on the existence of a file /usr/bin/java
). On CentOS, this capability is normally provided by the java-*-openjdk RPM
. Therefore, if you execute # yum install tomcat7
on a clean install of CentOS, yum will install OpenJDK in addition to Tomcat 7.
Some people prefer to run the Oracle JRE/JDK instead of OpenJDK. Oracle provides RPMs named jre-<em>version</em>-linux-x64.rpm
and jdk-<em>version</em>-linux-x64.rpm
to make installing them easier. Unfortunately, these RPMs do not provide the capability java
. This means that if you already have the Oracle JRE installed, and you install a RPM which requires the capability java
, the OpenJDK will be unnecessarily installed (and might even become the default!).