Upgrade to Ubuntu 10.04 broke my Oracle SQL Developer

I just upgraded from Ubuntu 9.10 Karmic Koala to 10.04 Lucid and my Oracle SQL Developer stopped working entirely. I didn't bother trying to look in to it as my SQL Developer was rather old anyway so I downloaded 2.1.1.64 and it didn't work either. Seeing the warnings on the SQL Developer page about supported JDKs I first checked what I had installed.

It appeared I had:

$ dpkg-query -l '*jdk*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
un  openjdk-6-dbg  <none>         (no description available)
un  openjdk-6-demo <none>         (no description available)
un  openjdk-6-doc  <none>         (no description available)
rc  openjdk-6-jdk  6b18-1.8.1-0ub OpenJDK Development Kit (JDK)
ii  openjdk-6-jre  6b18-1.8.1-0ub OpenJDK Java runtime, using Hotspot JIT
ii  openjdk-6-jre- 6b18-1.8.1-0ub OpenJDK Java runtime, using Hotspot JIT (hea
ii  openjdk-6-jre- 6b18-1.8.1-0ub OpenJDK Java runtime (architecture independe
un  openjdk-6-jre- <none>         (no description available)
un  openjdk-6-sour <none>         (no description available)
ii  sun-java5-jdk  1.5.0-20-0ubun Sun Java(TM) Development Kit (JDK) 5.0
ii  sun-java6-jdk  6.20dlj-1ubunt Sun Java(TM) Development Kit (JDK) 6

The first thing I remembered is that my ~/.sqldeveloper dir contained a jdk file pointing to the JDK. Once that was changed to "/usr/lib/jvm/java-1.6.0-openjdk" SQL Developer started and appeared to work but mysteriously some menu items were missing (most notably, compile on the right click on a package and the compile/debug buttons when editing a package). After a lot of digging about I discovered I needed to install openjdk-6-jdk because otherwise you are missing some jar files (possibly like tools.jar). However, after having got this far I realised I already had all I needed installed in /usr/lib/jvm/java-6-sun-1.6.0.20. Removing openjdk-6-jdk and changing my jdk file in ~/.sqldeveloper to /usr/lib/jvm/java-6-sun-1.6.0.20 also got me my menu items back.