Java gone after upgrade to 10.04

After upgrading to Kubuntu Lucid (10.04) Java did not work anymore because the package that contains Sun's Java JRE is deprecated. Firefox tries to find a suitable plugin but fails.

The solution is to install the packages openjdk-6-jre and icedtea6-plugin.