Saturday 8 September 2012

Installing JAVA 1.6 on Ubuntu 11.04 

Well I had to re-install my computer, I lost all my data, I was so disappointed but then I thought what rifiki said in the Lion King "The past does hurt, but the way I see it you can either run from it or LEARN from it."

So, I thought I will install some bare minimum things I need in daily development and share all with you. Maybe some one gets some help and I feel happy :)

This is the third thing on my to-do list. Please follow the following steps:

1) Open a terminal by Applications > Accessories > Terminal or Alt + F2 , then type gnome-terminal, press enter.
2) sudo add-apt-repository ppa:ferramroberto/java
[sudo] password for nikhil: my-password-here
3) sudo apt-get update
4) Then, install java jre:
 sudo apt-get install sun-java6-jre sun-java6-plugin
5) Install Jdk by the command:
 sudo apt-get install sun-java6-jdk

6) sudo apt-get install sun-java6-jdk
7) Now, setting the JAVA_HOME variable in .bashrc file 

JAVA_HOME=/usr/lib/jvm/java-6-sun (Don't give spaces between = and /usr)
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH

8) Test it by javac -version
javac 1.6.0_26
9) Congratulations !!!











No comments:

Post a Comment