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 73be2837..8fa7cb7e 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java @@ -250,7 +250,7 @@ public static JavaVersion getByPath(Path jvmDir) throws IOException { arch = null; } } else { - versionAndBuild = new JavaVersionAndBuild(isExistExtJavaLibrary(jvmDir, "jfxrt") ? 8 : 9, 0); + versionAndBuild = new JavaVersionAndBuild(isExistExtJavaLibrary(jvmDir, "rt") ? 8 : 9, 0); } JavaVersion resultJavaVersion = new JavaVersion(jvmDir, versionAndBuild.version, versionAndBuild.build, arch, false); if (versionAndBuild.version <= 8) { @@ -265,8 +265,10 @@ public static JavaVersion getByPath(Path jvmDir) throws IOException { public static boolean isExistExtJavaLibrary(Path jvmDir, String name) { Path jrePath = jvmDir.resolve("lib").resolve("ext").resolve(name.concat(".jar")); + Path jrePathLin = jvmDir.resolve("lib").resolve(name.concat(".jar")); Path jdkPath = jvmDir.resolve("jre").resolve("lib").resolve("ext").resolve(name.concat(".jar")); - return IOHelper.isFile(jrePath) || IOHelper.isFile(jdkPath); + Path jdkPathLin = jvmDir.resolve("jre").resolve("lib").resolve(name.concat(".jar")); + return IOHelper.isFile(jrePath) || IOHelper.isFile(jdkPath) || IOHelper.isFile(jdkPathLin) || IOHelper.isFile(jrePathLin); } } }