Install Java JDK in CentOS 7 (Source Code Installer)
This article will bring you go through how to install Java into CentOS7.
Step 1: Download Java JDK from the official website.
Link: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
After download please upload to the server you want to install JAVA.
Step2: Unarchive Java Package
cd /opt/ tar -zxvf jdk-8u151-linux-x64.tar.gz mv jdk-8u151-linux-x64 jdk
Step3: Set Java Environment in /etc/profile (Before Export PATH)
JAVA_HOME=/opt/jdk
export JAVA_HOME
CLASSPATH=.:$JAVA_HOME/lirootb:$JAVA_HOME/jre/lib
export CLASSPATH
JRE=$JAVA_HOME/jre
export JRE
PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
source /etc/profile
Step4: Check Java Version to verify you had successfully installed JAVA
java -version
You should see something like below.
Thank You for Visiting Us.
Leave a Reply
Want to join the discussion?Feel free to contribute!