[libbluray-devel] win32: Java 9 uses different registry keys

hpi1 git at videolan.org
Fri Dec 22 09:27:13 CET 2017


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Dec 22 10:11:04 2017 +0200| [cd8188969edabd67364bf870af96a2b18ac19138] | committer: hpi1

win32: Java 9 uses different registry keys

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=cd8188969edabd67364bf870af96a2b18ac19138
---

 src/libbluray/bdj/bdj.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/libbluray/bdj/bdj.c b/src/libbluray/bdj/bdj.c
index 27dcb9be..638f2879 100644
--- a/src/libbluray/bdj/bdj.c
+++ b/src/libbluray/bdj/bdj.c
@@ -123,6 +123,11 @@ static void *_load_jvm_win32(const char **p_java_home)
 
     r = RegOpenKeyExW(HKEY_LOCAL_MACHINE, buf_loc, 0, KEY_READ, &hkey);
     if (r != ERROR_SUCCESS) {
+        /* Try Java 9 */
+        wcscpy(buf_loc, L"SOFTWARE\\JavaSoft\\JRE\\");
+        r = RegOpenKeyExW(HKEY_LOCAL_MACHINE, buf_loc, 0, KEY_READ, &hkey);
+    }
+    if (r != ERROR_SUCCESS) {
         BD_DEBUG(DBG_BDJ | DBG_CRIT, "Error opening registry key SOFTWARE\\JavaSoft\\Java Runtime Environment\\\n");
         return NULL;
     }



More information about the libbluray-devel mailing list