Bug 54443 - "Tools - Options - Java" does not select best version
Summary: "Tools - Options - Java" does not select best version
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 102782 (view as bug list)
Depends on:
Blocks: Java-Runtime-JRE
  Show dependency treegraph
 
Reported: 2012-09-03 14:33 UTC by Stephan Bergmann
Modified: 2022-08-09 14:37 UTC (History)
3 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 Stephan Bergmann 2012-09-03 14:33:13 UTC
At least with recent LO master on Windows, with a fresh UserInstallation, "Tools - Options... - LibreOffice - Java - Java options - Java runtime environments (JRE) already installed" lists potentially multiple entries, but none is selected.

"Cancel", then "File - Wizards - Letter...", "Cancel", then "Tools - Options... - LibreOffice - Java": now (i.e., as soon as Java is actually used for the first time in LO) one entry is selected.

That is rather confusing.  It would be better to select the best Java when the options tab page is opened and no selection is made yet.  Relevant implementation is probably jfw_findAndSelectJRE.

(This cannot be observed on Linux, as soffice script calls javaldx -- which calls jfw_findAndSelectJRE if none has been selected yet -- before calling soffice.bin.)
Comment 1 Joel Madero 2013-06-27 16:58:23 UTC
Confirmed.

Windows 8
Version 4.1.0.1

New
Minor - wouldn't prevent work getting done but can slow it down
High - probably easy to fix, also if a user didn't know where to poke around could be quite annoying 

ProposedEasyHack
Comment 2 QA Administrators 2015-03-16 23:39:11 UTC Comment hidden (obsolete)
Comment 3 tommy27 2016-04-16 07:26:28 UTC Comment hidden (obsolete)
Comment 4 Gerhard Schaber 2016-07-24 11:00:41 UTC
I did a related test with 5.1.4.2 on Windows 7 64bit. A 32bit version of Java was selected in the configuration. When Java is updated on the system, both a 64bit and 32bit version gets installed. After that, Java related things (reports, etc.) do not function properly anymore in LibreOffice. It turns out, that LibreOffice selected one of the newly installes versions, but actually the 64bit one instead of 32bit.
Comment 5 Commit Notification 2017-03-13 08:18:32 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9143dd4ebe37b608e43d04434cf831624bf55b65

Related tdf#54443 List only matching JREs

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Stephan Bergmann 2017-03-13 11:32:37 UTC
The original issue from comment 0 should be fixed meanwhile with <https://cgit.freedesktop.org/libreoffice/core/commit/?id=36f637f7f21906fa3f37223e69b044db52036fb1> "tdf#103507 quickfix: Automatic selection of Oracle Java runtime on Windows".
Comment 7 Commit Notification 2017-03-14 17:01:00 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c8f0a37ff804e6329b21a4b7bfabb0667263c6e5&h=libreoffice-5-3

Related tdf#54443 List only matching JREs

It will be available in 5.3.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Buovjaga 2017-03-23 10:02:48 UTC
Still confirmed with fresh profile nothing is selected. I have 1.7 and 1.8.

Version: 5.4.0.0.alpha0+
Build ID: 1670cc25bc2771e87f7956a4b0dd634abaa4128b
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-03-22_23:28:42
Locale: fi-FI (fi_FI); Calc: CL
Comment 9 Stephan Bergmann 2017-03-24 08:50:27 UTC
Sorry, I had apparently set this to RESOLVED FIXED in error.  The commits from comment 5 and comment 7 are only related to this issue, but were not meant to (nor do) fix the original issue from comment 0.
Comment 10 QA Administrators 2018-09-06 02:59:10 UTC Comment hidden (obsolete)
Comment 11 Timur 2020-06-10 07:58:16 UTC
Repro in Windows with LO 5.0 and 6.0 (where it just list versions 1.6, 1.7 and 1.8) and in 6.4 and 7.1+ (where it filters only 1.8 in my case but doesn't select it).
Comment 12 Timur 2020-06-10 08:02:22 UTC
*** Bug 102782 has been marked as a duplicate of this bug. ***
Comment 13 QA Administrators 2022-08-06 03:34:10 UTC Comment hidden (obsolete)
Comment 14 Stephan Bergmann 2022-08-09 14:37:51 UTC
(In reply to QA Administrators from comment #13)
> Test to see if the bug is still present with the latest version of
> LibreOffice from https://www.libreoffice.org/download/
> 
> If the bug is present, please leave a comment that includes the information
> from Help - About LibreOffice.

still present with recent local LO master (towards LO 7.5) test build