You install software in Ubuntu 11.10 with the Ubuntu Software Center (USC). If you search for java6 you’ll find Sun Java(TM) Development Kit (JDK) 6.
Problem 1: you can’t install it because it’s not found in your current software sources
Solution 1: enable the Canonical’s partner repository
Problem 2: the package was recently deleted from the repository (see package 361283)
Solution 2: enable the Canonical’s partner repository from Ubuntu Natty
Here are the steps that worked for me:
- edit the /etc/apt/sources.list file
- copy, uncomment and replace oneiric with natty in the following two lines (I found them at line 52 and 53)
# deb http://archive.canonical.com/ubuntu oneiric partner # deb-src http://archive.canonical.com/ubuntu oneiric partner
- reload your sources with the commando:
sudo apt-get update
When you reopen the USC and search for java6, you can finally install it. Optionally you can check the sun-java6-source add-on before installing.
You make the Sun Java 6 JDK the default by executing the following commando:
sudo update-java-alternatives -s java-6-sun
I got these errors but everything seems to be working though
update-alternatives: error: no alternatives for -javaplugin.so. update-alternatives: error: no alternatives for xulrunner-1.9-javaplugin.so. update-alternatives: error: alternative /usr/lib/jvm/java-6-sun/jre/lib/amd64/libnpjp2.so for mozilla-javaplugin.so not registered, not setting. update-alternatives: error: no alternatives for xulrunner-1.9-javaplugin.so.