Java 1.7 Installation
Download Java Package HERE
root@rahul-desktop~]#cd /etc/alternatives/
Download Java Package HERE
- Create a Directory
- Extract JDK.tar file to the Directory
- Now delete the old java and update new
root@rahul-desktop~]#cd /etc/alternatives/
root@rahul-desktop alternatives]# rm -f java javac keytool
root@rahul-desktop alternatives]# ln -s /usr/java/jdk1.7.0_11/bin/java .
root@rahul-desktopalternatives]# ln -s /usr/java/jdk1.7.0_11/bin/javac .
root@lrahul-desktop alternatives]# ln -s /usr/java/jdk1.7.0_11/bin/keytool .
- Set the class path
root@rahul-desktop~]# vi .bash_profile or .bashrc
export PATH=$PATH:/usr/java/jdk1.7.0_11/bin/
export CLASS=$CLASSPATH:/usr/java/jdk1.7.0_11/jre/lib
:wq!
export CLASS=$CLASSPATH:/usr/java/jdk1.7.0_11/jre/lib
:wq!
- Now Verify
root@rahul-desktop~]#source .bashrc
root@rahul-desktop~]#echo $JAVA_HOME
/usr/java/jdk1.7.0_11
root@rahul-desktop~]#java -version
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) Client VM (build 23.6-b04, mixed mode)
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) Client VM (build 23.6-b04, mixed mode)
No comments:
Post a Comment