Apple provides /usr/libexec/java_home(1) binary since Mac OS X 10.5 and most applications uses system java and/or you can install third-party Java.
I have Mac OS X Lion 10.7.4 with latest updates and my java home is '/Library/Java/JavaVirtualMachines/1.6.0_31-b04-413.jdk/Contents/Home'
But I can't drop below 1.6.0_31-b04-413.jdk bundle and can't create soft links due restrictions to target file.
So I wish to
1) Use system Java by default
2) Be able to drop into jdk bundles and soft links.
I confess that I don't understand this report exactly (for me, LibreOffice always has found and selected the system Java without any problems; I'm on 10.6.8, if this is of any importance), but just a hint:
could this be related to (or even the same as) bug 44679?
I use 10.5 and I have seemingly the same or similar problems.
I can choose one of the JVM, it seems to accept it, then I restart LO and it doesn't find the JVM.
I try to choose another VM and it says it's not compatible.
All used to work well on 3.5.x versions.
have you both tried a fresh profile? https://wiki.documentfoundation.org/UserProfile
Kindom: in addition to what Joel said, could you give a try to a newer Lo version (last one is 4.1.2)?
Since this initial report is unclear, seeting to dupe of a report describing a similar problem and being more specific about what the problem is.
*** This bug has been marked as a duplicate of bug 74597 ***
LibreOffice does not make use of the java_home tool, but instead has its own hardcoded list of where to search for JREs (see getAllJREInfos in jvmfwk/plugins/sunmajor/pluginlib/util.cxx). This may well be the cause for various issues where people report that LO does not find their JRE installations.
With 64bit LO 126.96.36.199 on OSX 10.9.2 I can no longer reproduce this problem. I go to Prefs > LibreOffice > Extended > select java 1.7, close LO, re-open, 1.7 is selected, repeat steps with 1.6 and 1.6 is selected when re-opening.
Yey! If I'm mistake and this is not yet fixed please reopen and add some thoughts.
When writing comment 6 I had assumed that the java_home tool would be able to report Oracle Java versions installed on the machine in addition to Apple Java versions, but that seems not to be the case. So given that detecting Apple Java versions (and Oracle Java versions, too) in LO without using the java_home tool mostly works, and that using the java_home tool would not have any positive effects on the status of detecting Oracle Java versions, and that I at least won't find time to make LO use the java_home tool anytime soon, lets keep this issue closed.