How to install java on CentOs.

How To Install Java On CentOs.

  1. First update all packages.

Use these command:

2. Install OpenJDK package with these comand:

3. Install OpenJDK-devel package:

4. Check if the package is installed properly through rpm tool:

5. Now check the java version:

This is how to install Java in five steps.