Sunday 11 July 2021

How to install Java 11 on CentOS 8



Java 11  package is available in CentOS 8 base repositories to download and install. The java runtime environment package and its dependencies can be installed using dnf CentOS8 package management tool.This article describes How to install Java 11 on CentOS 8 
 
[root@linuxcnf ~]# cat /etc/redhat-release
CentOS Linux release 8.2.2004 (Core)
[root@linuxcnf ~]#
 
Step 1. Package Installation: Run the following command to install Java 11:
 
[root@linuxcnf ~]# dnf install java-11 -y
Last metadata expiration check: 3:57:40 ago on Sun 11 Jul 2021 04:11:21 PM IST.
Dependencies resolved.
…………………………
Installed:
…………………………
                  jasper-libs-2.0.14-4.el8.x86_64
  java-11-openjdk-1:11.0.11.0.9-2.el8_4.x86_64  java-11-openjdk-headless-1:11.0.11.0.9-2.el8_4.x86_64 javapackages-filesystem-5.3.0-1.module_el8.0.0+11+5b8c10bd.noarch
…………………………
 
Complete!
[root@linuxcnf ~]#
 
Step 3. Validate Installation: Run the following command to validate the installation
 
[root@linuxcnf ~]# java -version
openjdk version "11.0.11" 2021-04-20 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.11+9-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.11+9-LTS, mixed mode, sharing)
[root@linuxcnf ~]#
 
Done: Java 11 installation is done on CentOS 8.

No comments:

Post a Comment