mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-01 22:14:01 +03:00
Correct check 8 openjdk on linux
This commit is contained in:
parent
2045f1ac99
commit
9dfb4ff323
1 changed files with 4 additions and 2 deletions
|
@ -250,7 +250,8 @@ public static JavaVersion getByPath(Path jvmDir) throws IOException {
|
|||
arch = null;
|
||||
}
|
||||
} else {
|
||||
versionAndBuild = new JavaVersionAndBuild(isExistExtJavaLibrary(jvmDir, "jfxrt") ? 8 : 9, 0);
|
||||
LogHelper.dev("TEST3: " + jvmDir + " | Version: " + isExistExtJavaLibrary(jvmDir, "rt"));
|
||||
versionAndBuild = new JavaVersionAndBuild(isExistExtJavaLibrary(jvmDir, "rt") ? 8 : 9, 0);
|
||||
}
|
||||
JavaVersion resultJavaVersion = new JavaVersion(jvmDir, versionAndBuild.version, versionAndBuild.build, arch, false);
|
||||
if (versionAndBuild.version <= 8) {
|
||||
|
@ -266,7 +267,8 @@ 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 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue