The Oracle Java 8 and Java 11 required subscription to download and install. So we use OpenJDK for this installation to run Java on CentOS 7/6 and RHEL 7/6 Linux system.. This article will help you to install Java 11 on CentOS 7/6, RHEL 7/6 Linux system.
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.
Advertisement
sudo dnf search openjdk
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.
sudo dnf install java-11-openjdk
Step 3 – Check Java Version
Let’s check the installed and current active Java version on your system using the following command:
java -version openjdk version "11.0.4" 2019-07-16 LTS OpenJDK Runtime Environment 18.9 (build 11.0.4+11-LTS) OpenJDK 64-Bit Server VM 18.9 (build 11.0.4+11-LTS, mixed mode, sharing)
9 Comments
if i export environment variable to the /ect/environment in centos 7 vi,ls etc commands are not working and unable to enter into the system after reboot
cool, with this tutorial I installed jdk to install eclipse, thank you
Thank you!
Java is a programming language which is used in lots of places in today’s world from android apps to commercial e-commerce website from financial applications to scientific tools, games, electronic trading devices and other desktop applications similar to IntelliJ, Eclipse, Netbeans from an open source library to J2ME apps.
Thanks for sharing the article.
Thank you!!!
Thank you for useful contents
hi bro it is not working and my system commands not working after installation of java
thanks, but it is not saving in proper way in pdf.
Thank you rahul. It was useful information.