When you install anything related to Java in Ubuntu (e.g. Eclipse) then it insists on installing the GNU Java compatibility layer (Java 1.4). If you remove it to try and force your shiny new Sun Java 1.6 (for instance) then things break in apt :-(. So let apt fix it by re-installing gcj and then run the command sudo update-alternatives --config java and select the correct version of Java you want use. YMMV I think update-alternatives bears closer scrutiny.

Powered by ScribeFire.