Sunday, December 30, 2012

How add new/otherJava Versions in linux

 just download the java( tar.gz files) which you want  install in linux

extract that  for example:

I have downloaded the Jdk1.7.tar.gz for 64 bit,placed on the opt/local

follow:

ln -s jdk1.7.0 newjava

then edit the  profile file and add the following linesat bottom

vi /etc/profile

export JAVA_HOME=/opt/local/newjava
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar

No comments: