Friday, November 6, 2015

Oracle JDK on Centos 7

Download and install the Oracle JDK
rpm -ivh jdk-7u80-Linux-x64.rpm


Set the Java environment variables
vi /etc/profile.d/java.sh


Add the following lines to java.sh
#!/bin/bash
JAVA_HOME=/usr/java/jdk1.7.0_80/
PATH=$JAVA_HOME/bin:$PATH
export PATH JAVA_HOME
export CLASSPATH=.



Make java.sh executable
chmod +x /etc/profile.d/java.sh


Set the variables,
source /etc/profile.d/java.sh







No comments:

Post a Comment