In Ubuntu 11 it’s really easy to install Sun’s version of Java JDK (or JRE). Why would you want to do this? Well, personally, I have found that the OpenJDK doesn’t always work quite exactly right with a lot of Java programs, so I prefer to use the Sun JDK (I guess it’s Oracle now).
To install simply do the following from your console:
sudo add-apt-repository ppa:ferramroberto/java sudo apt-get update sudo apt-get install sun-java6-jdk sun-java6-jre sudo update-alternatives --config java
Then you’ll want to pick the Sun version of Java. Now you’ll be using Sun Java whenever you execute the ‘java’ command. You can also verify this by typing ‘java –version’ and you should see the HotSpot mentioned, instead of the IcedTea.