Installing Sun JDK/JRE on ubuntu (10.04 LTS)
It was actually easy till the time i got a message from the new installation of ubuntu that sun-java6-jdk is not found in package list. From last two versions of linux specifically on ubuntu i used to do following for installing java.
$ sudo apt-get install sun-java6-jdk
This command asks me the root password and then installs sun jdk and jre. I also need to change the PATH variable accordingly i.e.
$ vi ~/.bashrc export JAVA_HOME=/usr/lib/jvm/java-6-sun
With the new installation of Ubuntu 10.04 LTS you need to do some modifications in /etc/apt/sources.list file to add a repository. Just try to search “canonical” and then uncomment two lines which looks like “deb http://archive.canonical.com/ lucid partner”
After that save the file and run following command to install Java:
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
Alternatively you can also add partner repository by using following command as well:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
Most Commented Posts
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

[...] doing this you can update the sources.list and follow the above steps.Post in techgyan by Aditya (http://www.techiegyan.com/?p=1362) helped me to do this.Thanks to Aditya. Next step will be downloading the right version of [...]