diff --git a/Launcher/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java b/Launcher/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java index 7b4f4864..c931a392 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java +++ b/Launcher/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java @@ -71,10 +71,13 @@ public static void main(String[] arguments) throws IOException, InterruptedExcep tryAddModule(findPath, "javafx.graphics", builder); tryAddModule(findPath, "javafx.fxml", builder); tryAddModule(findPath, "javafx.controls", builder); + boolean useSwing = tryAddModule(findPath, "javafx.swing", builder); String modulePath = builder.toString(); if (!modulePath.isEmpty()) { args.add("--add-modules"); - args.add("javafx.base,javafx.fxml,javafx.controls,jdk.unsupported"); + String javaModules = "javafx.base,javafx.fxml,javafx.controls,jdk.unsupported"; + if(useSwing) javaModules = javaModules.concat(",javafx.swing"); + args.add(javaModules); args.add("--module-path"); args.add(modulePath); }