

See also How to Set Session Timeout in Red Hat

There are 2 programs which provide 'java'. If your system has multiple versions of Java installed, then the above command may provide you a list of Java installation. Set the default java with following command. Update-alternatives -install /usr/bin/java java /usr/jdk-11.*/bin/java 2 Following commands will install the Java on your system. You must setup Java with the alternatives commands. Wget -no-check-certificate -no-cookies -header "Cookie: oraclelicense=accept-securebackup-cookie" Navigate to official OracleJDK site to get the latest version.įollowing step will install OracleJDK. # java -versionopenjdk version "1.8.0_191 # OpenJDK Yum install -y java-1.8.0-openjdk-headless.x86_64 Java-1.8.0-openjdk.x86_64 # To execute java applications.java-1.8.0-openjdk-devel.x86_64 # For compilation of Java. In repository, there are several version of OpenJDK as followings: Note: you can install multiple JDKs on single operating system.įirst, you need to have wget package already installed. This guide will help you to install either Open JDK or Oracle JDK to your development environment on Redhat (RHEL 7) or CentOS 7. So, you need to install Java Development Kit (JDK). Java is used in most application today as their development base of their application.
