From 926e1534af43593ba9fc52fcb458946d5952a3e6 Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 17 Jun 2020 15:54:23 +0700 Subject: [PATCH] =?UTF-8?q?[FEATURE]=20=D0=92=D1=8B=D0=B2=D0=BE=D0=B4=20?= =?UTF-8?q?=D0=BE=D1=82=D0=BB=D0=B0=D0=B4=D0=BA=D0=B8=20=D0=B2=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B8=D1=81=D0=BA=D0=B5=20Java?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/pro/gravit/launcher/ClientLauncherWrapper.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Launcher/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java b/Launcher/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java index c8fb317d..90e52953 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java +++ b/Launcher/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java @@ -189,6 +189,7 @@ public static boolean tryAddModule(Path[] paths, String moduleName, StringBuilde public static JavaVersion findJavaByProgramFiles(Path path) { + LogHelper.debug("Check Java in %s", path.toString()); JavaVersion selectedJava = null; File[] candidates = path.toFile().listFiles(File::isDirectory); if(candidates == null) return null; @@ -198,6 +199,7 @@ public static JavaVersion findJavaByProgramFiles(Path path) try { JavaVersion javaVersion = JavaVersion.getByPath(javaPath); if(javaVersion == null || javaVersion.version < 8) continue; + LogHelper.debug("Found Java %d in %s (javafx %s)", javaVersion.version, javaVersion.jvmDir.toString(), javaVersion.enabledJavaFX ? "true" : "false"); if(javaVersion.enabledJavaFX && (selectedJava == null || !selectedJava.enabledJavaFX)) { selectedJava = javaVersion; @@ -211,6 +213,10 @@ public static JavaVersion findJavaByProgramFiles(Path path) LogHelper.error(e); } } + if(selectedJava != null) + { + LogHelper.debug("Selected Java %d in %s (javafx %s)", selectedJava.version, selectedJava.jvmDir.toString(), selectedJava.enabledJavaFX ? "true" : "false"); + } return selectedJava; }