How to install sun-java6-jdk and Netbeans in Ubuntu 11.10
If you’ve recently upgraded to Ubuntu 11.10 and are a developer you may notice some things missing. For one there is no longer an option to install the sun-java6-jdk or JRE from the repositories. Worse they also removed the Netbeans IDE. Apparently this had something to do with licenses but if you’re going to offer MP3 support the least you could do is make software like this available for those who are willing to look for it.
Anyway with that rant out of the way I did manage to find a way to install both.
Following the instructions on this excellent post I was able to successfully install sun-java6-jdk using the following commands:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin
There are alternative instructions for installing Java 7 as well.
My first attempt at installing both was to head to the official Oracle Java website and download the Netbeans + JDK installer. Unfortunately the installer seems to crash in this version of Ubuntu. However since the above process had installed the JRE I was able to simply grab the Netbeans only installer from Oracle which ended up working surprisingly well. Just remember to run it using sudo if you want other users to be able to use it as well.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).