This document deals with how to setup OpenJDK 11
OpenJDK is a free and open-source implementation of the Java Platform, Standard Edition. It is the result of an effort Sun Microsystems began in 2006. The implementation is licensed under the GNU General Public License version 2 with a linking exception



yum install wget

Download OpenJDK 11

wget -O /tmp/openjdk-11+28_linux-x64_bin.tar.gz

Extract the OpenJDK 11

cd /tmp
tar -xvzf openjdk-11+28_linux-x64_bin.tar.gz
mkdir /usr/java
mv jdk-11 /usr/java

Create a profile file to load the java path


vi /etc/profile.d/
export PATH=/usr/java/jdk-11/bin:$PATH
export JAVA_HOME=/usr/java/jdk-11

Enable the Java profile.

source /etc/profile.d/

Check the java version

java -version
openjdk version "11" 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)

Now java will be available for each and every user. if you want java to be available for a specific user, then add entry in .bashrc of each user.

© 2018, Techrunnr. All rights reserved.

Questions Answered
Articles Written
Overall Points
Categories: Linuxubuntu

Prabhin Prabharkaran

He is Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!!


Leave a Reply

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.