Setup Java
Java is a computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible. Here is easy way to setup java on Centos 6, and choose it version
Download and setup Java: Oracle Java
tar -xzf jdk-7u79-linux-x64.tar.gz mv jdk1.7.0_79 /opt/
Configure Java
cd /opt/jdk1.7.0_79 alternatives --install /usr/bin/java java /opt/jdk1.7.0_79/bin/java 5 alternatives --config java
Declare
JAVA_HOME
vi $HOME/.bash_profile
# add following export command after line "export PATH" export JAVA_HOME=/opt/jdk1.7.0_79 export JRE_HOME=/opt/jdk1.7.0_79/jre export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
Reload
.bash_profile
source $HOME/.bash_profile
Useful resources
Comments
Post a Comment