Bug 50918 - LibreOffice can't select installed Java
Summary: LibreOffice can't select installed Java
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
Version:
(earliest affected)
3.6.0.1 rc
Hardware: x86-64 (AMD64) Mac OS X (All)
: high major
Assignee: Stephan Bergmann
URL:
Whiteboard: NoRepro:4.2.1.1:OSX
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-09 11:29 UTC by Kindom
Modified: 2014-03-03 08:02 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kindom 2012-06-09 11:29:56 UTC
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.

http://developer.apple.com/library/mac/#DOCUMENTATION/Darwin/Reference/ManPages/man1/java_home.1.html
Comment 1 Roman Eisele 2012-06-28 08:06:16 UTC
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?
Comment 2 Carlo Bertelli 2012-09-14 14:30:19 UTC
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.
Comment 3 Joel Madero 2013-09-24 20:32:21 UTC
have you both tried a fresh profile? https://wiki.documentfoundation.org/UserProfile
Comment 4 Julien Nabet 2013-10-10 20:48:27 UTC
Kindom: in addition to what Joel said, could you give a try to a newer Lo version (last one is 4.1.2)?
Comment 5 retired 2014-02-07 15:44:31 UTC
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 ***
Comment 6 Stephan Bergmann 2014-02-07 17:42:39 UTC
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.
Comment 7 retired 2014-03-02 10:00:21 UTC
WORKSFORME NoRepro:4.2.1.1:OSX

With 64bit LO 4.2.1.1 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.

http://s1.directupload.net/images/140302/ui2h7vma.png
Comment 8 Stephan Bergmann 2014-03-03 08:02:45 UTC
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.