sudo yum install installs only JRE not JDK - Centos

Kannan Ramamoorthy picture Kannan Ramamoorthy · Jun 30, 2017 · Viewed 7.8k times · Source

I tried installing open-jdk in Centos using the below command,

sudo yum install java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64

It installs only the JRE by not JDK.

After installation,

  1. The folder /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64 only jre

  2. javac is not recognized.

Answer

Kannan Ramamoorthy picture Kannan Ramamoorthy · Jun 30, 2017

After going through this link, found out that sudo yum install java-1.8.0-openjdk installs only JRE.

Executed sudo yum install java-1.8.0-openjdk-devel to install JDK.