Bug Hunting Session
Bug 112609 - Oracle JRE 9 not found for use automatically Windows builds
Summary: Oracle JRE 9 not found for use automatically Windows builds
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.4.1.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Stephan Bergmann
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Java-Runtime-JRE
  Show dependency treegraph
 
Reported: 2017-09-24 10:22 UTC by Wilfried Kaeufler
Modified: 2018-03-12 07:53 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 Wilfried Kaeufler 2017-09-24 10:22:08 UTC
The newest JRE 9 64 bit isn´t found by libre office.
Because lO search for rt.jar and substitute libs.
JRE 9 from oracle is only in 64 bit for download.
Tehe next LO 64 bit should be for JRE 9, the last JRE from Oracle.
Comment 1 V Stuart Foote 2017-09-24 17:02:46 UTC
The new Java 9 release seems to work correctly on a 5.4.2.1 build.

But, as Stephen B. suggested would happen bug 100501#7, for Windows builds LibreOffice is not finding the Java Runtime and it must be located manually with the Add button. 

Looks like to locate the "JavaHome" string we will have to change our registry search path in the Windows Registry [1] to match the Oracle path changes.

The JRE now uses
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JRE\9]
"JavaHome"="C:\\Program Files\\Java\\jre-9"
"RuntimeLib"="C:\\Program Files\\Java\\jre-9\\bin\\server\\jvm.dll"

While the JDK uses
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK\9]
"JavaHome"="C:\\Program Files\\Java\\jdk-9"

Previous builds used
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.8.0_144]
"JavaHome"="C:\\Program Files\\Java\\jre1.8.0_144"
"MicroVersion"="0"
"RuntimeLib"="C:\\Program Files\\Java\\jre1.8.0_144\\bin\\server\\jvm.dll"

and we search for the "Java Runtime Environment" for JRE or "Java Development Kit" instead of the new JRE, JDK entries.

Also, looks like there will be no 32-bit JRE for Java 9, meaning we'll have to continue to support the older paths indefinitely. 

=-ref-=

[1] https://opengrok.libreoffice.org/xref/core/jvmfwk/plugins/sunmajor/pluginlib/util.cxx?a=true#68

[2] http://www.oracle.com/technetwork/java/javase/jdk9certconfig-3761018.html
Comment 2 Alex Thurgood 2017-09-28 14:49:09 UTC
The problem also exists on the Mac, see bug 112716
Comment 3 Alex Thurgood 2017-09-28 15:58:18 UTC

*** This bug has been marked as a duplicate of bug 100501 ***
Comment 4 V Stuart Foote 2017-09-28 16:24:04 UTC
Stuart -> Alex, * -- Fixed on Linux and OS X but there is still work needed for automated JRE detection on the Windows builds as in comment 1. Rather than reopen bug 100501, removing the duplicate.
Comment 5 himajin100000 2018-03-09 22:56:46 UTC
Can we close this bug report as RESOLVED FIXED now?

https://gerrit.libreoffice.org/#/c/49792/

Information is not added to this bug report because on gerrit message there is no bug report id.
Comment 6 V Stuart Foote 2018-03-10 00:05:21 UTC
Yup... its picking up the JRE 9.0 with current builds.
Comment 7 Stephan Bergmann 2018-03-12 07:53:32 UTC
> https://gerrit.libreoffice.org/#/c/49792/
> 
> Information is not added to this bug report because on gerrit message there
> is no bug report id.

Yeah, sorry, looks like I'd lost sight of this bug when I came around to fixing the issue.