Install Java11 on RHEL7

#cat /etc/redhat-release

2. Enable optional rpm repository (depending upon your os type)

#yum-config-manager — enable rhel-7-server-optional-rpms
or
#yum-config-manager — enable rhel-7-workstation-optional-rpms

3. Install the OpenJDK 11 package

yum install java-11-openjdk-devel

4.Set Default Java Version

#sudo alternatives — config javatype the associated number and press Enter.

5. Check the java version

#java -version

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Himanshu Pratap

Himanshu Pratap

System Administrator and Full stack web developer.