Original thread: here
The following does not, in fact, install anything for me. I imagine the file is obsolete... but I'm a newb so I'll dust off a years-old thread
This package installs the essential tools needed to write and run Java programs.
sudo aptitude install sun-java6-jdk