How to fix requires JRE error on Ubuntu 8.04

I have the latest Java Runtime Environment installed but this error always comes up when I'm trying to export my writer document to html/xhtml. JRE error

When I open Tools -> Options -> Java, I didn't find any JRE which is supposed to be detected by I tried to figure out whats missing with my and after installing, I finally get export to html/xhtml working.
To fix this problem just open Applications -> Accessories -> Terminal and type:

apt-get install

After you install the package, open Tools -> Options -> Java.
Verify if detects your Java Runtime Environments. JRE