Configuring Oracle Java

  • Check the current java version:-

java -version

We can see that there is no OpenJdk installed

  • Install OpenJDK 8 JDK

To install OpenJDK 8 JDK using yum, run this command:

sudo yum install java-1.8.0-openjdk-devel -y

At the confirmation prompt, enter y then RETURN to continue with the installation.

  • Now re-check the java version.

java -version
  • Set JAVA_HOME variable and append to the PATH Note: Please specify the path of JAVA_HOME as per your version.

Last updated