To install java on debian 6, I used
add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
The installation finished without any errors. But when I test the current version (java --version), I still get 1.5.0, and not 1.6.x?! Where is the mistake? Do I have to perform some other steps to install Java 6?