mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FIX] Фикс ошибки JavaFX при запуске на Java 9+ без openjfx
This commit is contained in:
parent
7d5b912c3c
commit
1ae7c80c72
1 changed files with 2 additions and 2 deletions
|
@ -63,8 +63,6 @@ public static void main(String[] arguments) throws IOException, InterruptedExcep
|
|||
JVMHelper.addSystemPropertyToArgs(args, DirWatcher.IGN_OVERFLOW);
|
||||
if (!noJava9check && !System.getProperty("java.version").startsWith("1.8")) {
|
||||
LogHelper.debug("Found Java 9+ ( %s )", System.getProperty("java.version"));
|
||||
args.add("--add-modules");
|
||||
args.add("javafx.base,javafx.fxml,javafx.controls,jdk.unsupported");
|
||||
Path jvmDir = Paths.get(System.getProperty("java.home"));
|
||||
String pathToFx = System.getenv("PATH_TO_FX");
|
||||
Path fxPath = pathToFx == null ? null : Paths.get(pathToFx);
|
||||
|
@ -76,6 +74,8 @@ public static void main(String[] arguments) throws IOException, InterruptedExcep
|
|||
tryAddModule(findPath, "javafx.controls", builder);
|
||||
String modulePath = builder.toString();
|
||||
if (!modulePath.isEmpty()) {
|
||||
args.add("--add-modules");
|
||||
args.add("javafx.base,javafx.fxml,javafx.controls,jdk.unsupported");
|
||||
args.add("--module-path");
|
||||
args.add(modulePath);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue