[Libreoffice-commits] core.git: configure.ac

Stephan Bergmann sbergman at redhat.com
Sun Jan 7 19:14:48 UTC 2018


 configure.ac |   24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

New commits:
commit 7df57f6993cab4ba0f1fccce92394c4dfe46f067
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jan 5 17:20:11 2018 +0100

    Find JDK 9 on Windows
    
    Change-Id: I8854d0e7fb23602e5ca20309fc79890b4f31a70e
    Reviewed-on: https://gerrit.libreoffice.org/47479
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/configure.ac b/configure.ac
index ce7598305e54..7ef4a6c6a334 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6563,13 +6563,23 @@ if test "$ENABLE_JAVA" != ""; then
         fi
 
         if test -z "$with_jdk_home"; then
-            for ver in 1.8 1.7 1.6; do
-                reg_get_value "$bitness" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Development Kit/$ver/JavaHome"
-                if test -n "$regvalue"; then
-                    _jdk_home=$regvalue
-                    break
-                fi
-            done
+            dnl See <https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-EEED398E-AE37-4D12-
+            dnl AB10-49F82F720027> section "Windows Registry Key Changes":
+            reg_get_value "$bitness" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/CurrentVersion"
+            if test -n "$regvalue"; then
+                ver=$regvalue
+                reg_get_value "$bitness" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/$ver/JavaHome"
+                _jdk_home=$regvalue
+            fi
+            if test -z "$with_jdk_home"; then
+                for ver in 1.8 1.7 1.6; do
+                    reg_get_value "$bitness" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Development Kit/$ver/JavaHome"
+                    if test -n "$regvalue"; then
+                        _jdk_home=$regvalue
+                        break
+                    fi
+                done
+            fi
             if test -f "$_jdk_home/lib/jvm.lib" -a -f "$_jdk_home/bin/java.exe"; then
                 with_jdk_home="$_jdk_home"
                 howfound="found automatically"


More information about the Libreoffice-commits mailing list