From 89450378602a929a2b26a7a2c643c650908be531 Mon Sep 17 00:00:00 2001 From: Gravita Date: Sat, 1 Jan 2022 22:52:04 +0700 Subject: [PATCH] [FIX] InvalidPathException --- .../src/main/java/pro/gravit/utils/helper/JavaHelper.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java index ca23555f..ad70ca4f 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java @@ -3,6 +3,7 @@ import java.io.File; import java.io.IOException; import java.nio.file.Files; +import java.nio.file.InvalidPathException; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; @@ -77,6 +78,8 @@ public synchronized static List findJava() { tryAddJava(javaPaths, result, JavaVersion.getByPath(p1)); trySearchJava(javaPaths, result, p1.getParent()); } + } catch (InvalidPathException ignored) { + } catch (IOException e) { LogHelper.error(e); }