diff --git a/Launcher/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java b/Launcher/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java index 6e3cf58b..36781176 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java +++ b/Launcher/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java @@ -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); }