Step 1 – Search Java Packages

The OpenJDK rpm packages are available under the AppStream repository. Use the following command to search available Java packages under configured yum repositories.

Step 2 – Install Java 11 on CentOS

Now, use one of the following commands to install the required Java version on your CentOS 7/6 and RHEL 7/6 Linux system. You can also install the multiple Java version on any system and use it as per your requirements.

Step 3 – Check Java Version

Let’s check the installed and current active Java version on your system using the following command: