From f78152d725c83ddaf8c58b50996eac2e998b2e5c Mon Sep 17 00:00:00 2001 From: Philip T <2097483+phit@users.noreply.github.com> Date: Sat, 22 May 2021 13:37:51 +0200 Subject: [PATCH] NOISSUE Fix new Oracle Java Detection on Windows Those were changed with Java 9 https://docs.oracle.com/javase/9/install/installation-jdk-and-jre-microsoft-windows-platforms.htm#JSJIG-GUID-47C269A3-5220-412F-9E31-4B8C37A82BFB --- api/logic/java/JavaUtils.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/api/logic/java/JavaUtils.cpp b/api/logic/java/JavaUtils.cpp index 647711e51..18a731ca6 100644 --- a/api/logic/java/JavaUtils.cpp +++ b/api/logic/java/JavaUtils.cpp @@ -241,21 +241,33 @@ QList JavaUtils::FindJavaPaths() KEY_WOW64_64KEY, "SOFTWARE\\JavaSoft\\Java Runtime Environment"); QList JDK64s = this->FindJavaFromRegistryKey( KEY_WOW64_64KEY, "SOFTWARE\\JavaSoft\\Java Development Kit"); + QList NEWJRE64s = this->FindJavaFromRegistryKey( + KEY_WOW64_64KEY, "SOFTWARE\\JavaSoft\\JRE"); + QList NEWJDK64s = this->FindJavaFromRegistryKey( + KEY_WOW64_64KEY, "SOFTWARE\\JavaSoft\\JDK"); QList JRE32s = this->FindJavaFromRegistryKey( KEY_WOW64_32KEY, "SOFTWARE\\JavaSoft\\Java Runtime Environment"); QList JDK32s = this->FindJavaFromRegistryKey( KEY_WOW64_32KEY, "SOFTWARE\\JavaSoft\\Java Development Kit"); + QList NEWJRE32s = this->FindJavaFromRegistryKey( + KEY_WOW64_32KEY, "SOFTWARE\\JavaSoft\\JRE"); + QList NEWJDK32s = this->FindJavaFromRegistryKey( + KEY_WOW64_32KEY, "SOFTWARE\\JavaSoft\\JDK"); java_candidates.append(JRE64s); + java_candidates.append(NEWJRE64s); java_candidates.append(MakeJavaPtr("C:/Program Files/Java/jre8/bin/javaw.exe")); java_candidates.append(MakeJavaPtr("C:/Program Files/Java/jre7/bin/javaw.exe")); java_candidates.append(MakeJavaPtr("C:/Program Files/Java/jre6/bin/javaw.exe")); java_candidates.append(JDK64s); + java_candidates.append(NEWJDK64s); java_candidates.append(JRE32s); + java_candidates.append(NEWJRE32s); java_candidates.append(MakeJavaPtr("C:/Program Files (x86)/Java/jre8/bin/javaw.exe")); java_candidates.append(MakeJavaPtr("C:/Program Files (x86)/Java/jre7/bin/javaw.exe")); java_candidates.append(MakeJavaPtr("C:/Program Files (x86)/Java/jre6/bin/javaw.exe")); java_candidates.append(JDK32s); + java_candidates.append(NEWJDK32s); java_candidates.append(MakeJavaPtr(this->GetDefaultJava()->path)); QList candidates;