diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/util/platform/JavaVersion.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/util/platform/JavaVersion.java index 4e39a4356..503f491b5 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/util/platform/JavaVersion.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/util/platform/JavaVersion.java @@ -218,7 +218,7 @@ public final class JavaVersion { public static final JavaVersion CURRENT_JAVA; static { - Path currentExecutable = getExecutable(Paths.get(System.getProperty("java.home"))); + Path currentExecutable = getExecutable(Paths.get(System.getProperty("java.home")).toAbsolutePath()); try { currentExecutable = currentExecutable.toRealPath(); } catch (IOException e) {