


If your system has multiple versions of Java installed, then the above command may list you all Java versions, like below. Set the default java using the below command. Update-alternatives -install /usr/bin/java java /usr/jdk1.8.0_211/bin/java 3 Set Default Oracle Java Version Update-alternatives -install /usr/bin/java java /usr/jdk-11.0.3/bin/java 2 Update-alternatives -install /usr/bin/java java /usr/jdk-12.0.1/bin/java 1 Below command will install the Java on your system. Install Java with the alternatives commands. Tar -zxvf jdk-8u211-linux-圆4.tar.gz -C /usr Install Oracle Java # Oracle Java JDK 11 #LOGIN REQUIRED # Oracle Java JDK 8 #Įxtract the downloaded JDK archive to the desired directory (Ex. Wget -no-check-certificate -no-cookies -header "Cookie: oraclelicense=accept-securebackup-cookie" If you still want to use the command line, use the below command. You can either use command line or browser to download the JDK, better to use the browser, the easiest one.ĭownload Oracle JDK 11 (v11.0.3) (Login Required)ĭownload Oracle JDK 8 (v8u211) (Login Required) yum install -y wget Download Oracle Java JDK This guide will be more useful for them to set up a development environment when they especially use RHEL 7 or CentOS 7. Java JDK is the most important base for the developers. Today we will be looking into the installation of Oracle Java JDK on RHEL 7 / CentOS 7.
