Install java and javac on RedHat Linux
To install java and the java compiler on RedHat Linux, it is required to installed a couple of packages using yum.
As root, or sudo as a privileged user, execute the following commands at the command line prompt:
yum install java yum install java-1.8.0-openjdk-devel