Update: Here is a smarter way
Presently, only java 1.5 (aka java 5) is in the stable repository. Therefore, a little bit of work is needed to install java 1.6.
Start by downloading the files you need from the unstable repository, here.
Download all the files you need, I got the following ones:
If you want the doc package, you need to download the documentation zip (jdk-6-doc.zip) from java.sun.com manually, and do the following:
chown root jdk-6-doc.zip
chgrp root jdk-6-doc.zip
mv jdk-6-doc.zip /tmp/
Then I tried a simple
dpkg -i sun-java6-*
to install the packages but they have dependencies on libraries not yet in stable, so I tried to install them manually just to see what apt would tell me:
apt-get install unixodbc libstdc++5
This didn't work of course, but apt suggested that I'd try
apt-get -f install
which amazingly worked. After that java installed like a charm. Don't forget to select the right java version after you're done:
update-alternatives --config java