Sun's Java is now an official package in Dapper multiverse, so it may be easiest to upgrade to Dapper (very stable now).
The entire install process to install Eclipse and Sun's Java (on Dapper) is to install the following 2 meta packages: eclipse sun-java5-jdk
However, as noted Eclipse will now run very slowly since it will be using GNU's java, not Sun's. We now need to make Sun's java the default. First,
and select Sun's java. You might want to do the same for jar, javac, javadoc, javap, and javaws.
sudo update-alternatives --config java
Next, edit the JVM configuration file
and move the line
sudo -b gedit /etc/jvm
to the top.
Lastly, Eclipse for some reason ignores Ubuntu's JVM configuration file and uses its own (bug?). You need to edit eclipes's java_home file
sudo -b gedit /etc/eclipse/java_home
to the top of the file.
That's it. Does anyone think I should post these instructions as a HOWTO ?