Wednesday, February 27, 2013

Install JDK7 on Ubuntu 12.10

Note : This is applicable for Any Java Version and Any Ubuntu Version
  • Download the JDK disiered version and extract the .bin file
  • Move the extracted folder to the default JVM folder
  • Install new java source in system:
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_15/bin/javac 1
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_15/bin/java 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.7.0_15/bin/javaws 1

  • Select default java:
sudo update-alternatives --config javac

sudo update-alternatives --config java

sudo update-alternatives --config javaws


  • Test the updated java version:
java -version

  • Verify the all point to the new java location:

ls -la /etc/alternatives/java* 

 
There is a GUI tool in Ubuntu called "Alternative Configurator" which you can manually 
update above.
 
 

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.