Use Synaptic andmake sure these are installed:
sun-java5-bin
sun-java5-jre
sun-java5-plugin
java-common
That should get it working, but I haven't fussed with Java in a long time. Afterwards put "about:plugins" in the Firefox address bar to see if it is installed correctly.