Open up "Software Sources" (Applications->System->Software Sources)
On the first tab make sure all are ticked except "Source Code" - Close that
Then open a terminal(applications>accessories>terminal)
then type
Code:
Code:
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
(when you type your password you will not see it on screen)
It will start to install. It will ask for you to agree to license terms. Select Yes, and hit Enter.
After it has installed type in the terminal
Code:
the output should look like this
java version XXX
Java(TM) SE Runtime Environment (build xxxxxxx)
Java HotSpot(TM) Client VM (xxxx, mixed mode, sharing)
To check if it is enabled in firefox, open firefox and in the address bar type
Code:
about

lugins
EDIT: If that doesn't work, try:
Code:
sudo apt-get install sun-java6-jre sun-java6-jdk
:3
Copied from ubuntuforums.org.