How to upgrade Java version from 1.6 to 1.7 in Ubuntu

0
1611

Step 1: First download the tar file of java ( jre-7u5-linux-i586.tar.gz) using below URL

http://www.java.com/en/download/linux_manual.jsp

Step 2: tar -zxvf /Path to 'jre-7u5-linux-i586.tar.gz'/

Step 3: Move extracted folder to /usr/lib/jvm

#sudo cp -r jre1.7.0_05 /usr/lib/jvm/

Step 4: Install java now

#sudo update-alternatives –install /usr/bin/java java /usr/lib/jvm/jre1.7.0_05/bin/java 3

Step 5: Now choose the upgraded java version from :-

#sudo update-alternatives –config java

java-alternate-ubuntu

In My case i have  select 4 for my system.. choose :- /usr/lib/jvm/jdk1.7.0_04/bin/java

Step 6: Now create a soft link:-

#sudo ln -s /usr/lib/jvm/jre1.7.0_05/lib/i386/libnpjp2.so ~/.mozilla/plugins/

Step 7: Now check java version with the below command

#sudo java -version

you should get 1.7 java version in the output.

SHARE

LEAVE A REPLY