What do you mean "cannot get Java to work". Can you be more specific?
Are you getting an error message?
Is it listed in Control Panel>Add/Remove programs? (Edit: Whoooops . . . just noticed that you are using Ubuntu)
Do you see the Java Console in Control Panel? (Edit: Oooops again)
Are you downloading the off line install from Sun, or the stub for on line installs?
What version of Java are you trying? - version 6 Update 11 is the latest.
Do you get the "Java Console" selection in the Firefox 3 Tools menu?
Does it install any plug ins? ("about:plugins" in FF)
Does Control Panel>Add/Remove programs list any previous versions? (Edit: And another "oooopps" . . . not familiar with Ubuntu . . . does it have something analogous to the Windows Control Panel?)
If you install another "clean preferences" FF, does it work with that? (It may be that one of your extensions is incompatible with Java . . . but I've never heard of that circumstance).
Curious . . . why do you need Java? It is required for game sites, like "Pogo" and a few apps, like the little utility JDiskReport, and an online check at the Secunia site (but you can use Secunia's "PSI" and you won't need Java for Secunia), but other than that, you really don't need it.