How do I select the Sun JRE with LibreOffice 3.5 on GNU/Linux?

I’ve just installed LibreOffice 3.5 on a CentOS 5 system with the Sun Java Runtime Environment (JRE) installed. On starting up LO it complains that it cannot find a JRE.

If I try to select the Sun JRE (Tools->Options->LibreOffice->Java) and I navigate to the Sun JRE directory (/usr/java/default) it says that the directory does not contain a JRE. What is the correct way to select the Sun JRE in LO 3.5?

are you by any chance running a 64bit CentOS and did you download the i386 rather than 64bit version of LO? I did (on Kubuntu) and have just discovered my error, removed the i386 and installed the 64bit and now my jre is detected!!

On Mint 11 here. LO picked up “/usr/lib/jvm/java-6-sun-1.6.0.26” automatically

Had a different version as well and manually pointed to “~/jre1.6.0_30” and LO did the rest.

I was just about to try going back to 3.4 or using openJDK when the penny dropped… I had a similar issue to Peter R - but in my case I’d installed the 64-bit version of LibreOffice and I had a 32-bit version of Java (still need that for the Firefox plugin). Having both 32-bit works fine (will go to both 64-bit on CentOS 6 I hope).