Moon Light Box

Time is Money

Linux - Install OpenJDK1.8 in CentOS 7

| Comments

Step 1.

sudo yum -y install java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64

Step 2.

sudo vim /etc/profile.d/java-sdk-env.sh

Add below.

export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

Comments

comments powered by Disqus