You installed the Java Runtime Environment (JRE) only, which does not contain javac
. For javac
, you have to install theOpenJDK Development Environment. You can install java-devel
or java-1.6.0-openjdk-devel
, which both include javac
.
By the way: you can find out which package provides javac
with a yum
search, e.g.
su -c 'yum provides javac'
Another note: using yum
and openjdk
is only one possibility to install the JDK. Many people prefer Sun/Oracle's "original" SDK. SeeHow to install Java SDK on CentOS? and links for alternatives.