I just got these steps from the net a few years back and decided to put it here when a friend asked me for a howto.
1. Install the java package from the ubuntu package repository. This contains make-jpkg for creating the debian package later.
sudo apt-get install java-package
2. Download the jdk package from
here. As of this writing Java SE 6 is available.
3. Create a debian package out of the binary package you downloaded.
fakeroot make-jpkg jdk-6u23-linux-i586.bin
4. Install the newly created debian package.
sudo dpkg -i sun-j2sdk1.6_1.6.0+update23_i386.deb
That's it. Enjoy!