mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
[FIX] Current Java 9+ javafx selector fix
This commit is contained in:
parent
20a326a707
commit
8445ed2dca
1 changed files with 4 additions and 1 deletions
|
@ -187,7 +187,6 @@ public static Path tryGetOpenJFXPath(Path jvmDir) {
|
|||
|
||||
public static Path tryFindModule(Path path, String moduleName) {
|
||||
Path result = path.resolve(moduleName.concat(".jar"));
|
||||
LogHelper.dev("Try resolve %s", result.toString());
|
||||
if (!IOHelper.isFile(result))
|
||||
result = path.resolve("lib").resolve(moduleName.concat(".jar"));
|
||||
else return result;
|
||||
|
@ -334,6 +333,10 @@ private static boolean isCurrentJavaSupportJavaFX() {
|
|||
Class.forName("javafx.application.Application");
|
||||
return true;
|
||||
} catch (ClassNotFoundException e) {
|
||||
if (JVMHelper.getVersion() > 8) {
|
||||
Path jvmDir = Paths.get(System.getProperty("java.home"));
|
||||
return tryFindModule(jvmDir, "javafx.base") != null;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue