Installing Java

1. Update

yum -y update

2. Install Java 8

yum install java-1.8.0-openjdk

3. Verify Java is installed

java -version

Set Java’s Home Environtment

1. Find Java’s Path

update-alternatives –config java

2. Set Java’s Path in Your Environment

2.a Open .bash_profile with vi editor

vi .bash_profile

2.b. Enter following line in that file :

export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-0.el8_2.x86_64/jre/bin/java

2.c. Refresh file

source .bash_profile

2.d. Check JAVA_HOME

echo $JAVA_HOME

Software Engineer | Digital Transformation Practitioner | Web & Mobile Developer | IT Consultant | Technopreneur | Blogger

Leave a Reply

Your email address will not be published. Required fields are marked *