diff --git a/pom.xml b/pom.xml index 3caeebc..d401826 100644 --- a/pom.xml +++ b/pom.xml @@ -129,6 +129,52 @@ + + + + Java9 + + [9,10] + + + + javax.xml.bind + jaxb-api + 2.3.0 + + + + + + Java11+ + + ![1.8,9,10] + + + + javax.xml.bind + jaxb-api + 2.3.0 + + + org.openjfx + javafx-controls + 11.0.2 + + + org.openjfx + javafx-fxml + 11.0.2 + + + org.openjfx + javafx-web + 11.0.2 + + + + + UTF-8 1.8 diff --git a/src/main/java/fxlauncher/Launcher.java b/src/main/java/fxlauncher/Launcher.java index fc36bd7..390f8b2 100644 --- a/src/main/java/fxlauncher/Launcher.java +++ b/src/main/java/fxlauncher/Launcher.java @@ -1,6 +1,19 @@ package fxlauncher; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintWriter; +import java.net.URI; +import java.nio.file.Path; +import java.util.Iterator; +import java.util.ServiceLoader; +import java.util.concurrent.CountDownLatch; +import java.util.logging.Level; +import java.util.logging.Logger; + +import com.sun.javafx.application.ParametersImpl; import com.sun.javafx.application.PlatformImpl; + import javafx.application.Application; import javafx.application.Platform; import javafx.fxml.FXMLLoader; @@ -13,18 +26,6 @@ import javafx.stage.Stage; import javafx.stage.StageStyle; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.PrintWriter; -import java.net.URI; -import java.nio.file.Path; -import java.util.Iterator; -import java.util.List; -import java.util.ServiceLoader; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.concurrent.CountDownLatch; - @SuppressWarnings("unchecked") public class Launcher extends Application { private static final Logger log = Logger.getLogger("Launcher"); @@ -35,7 +36,7 @@ public class Launcher extends Application { private UIProvider uiProvider; private StackPane root; - private final AbstractLauncher superLauncher = new AbstractLauncher() { + private final AbstractLauncher superLauncher = new AbstractLauncher() { @Override protected Parameters getParameters() { return Launcher.this.getParameters(); @@ -236,10 +237,7 @@ private void initApplication() throws Exception { private void startApplication() throws Exception { if (app != null) { - final LauncherParams params = new LauncherParams(getParameters(), superLauncher.getManifest()); - app.getParameters().getNamed().putAll(params.getNamed()); - app.getParameters().getRaw().addAll(params.getRaw()); - app.getParameters().getUnnamed().addAll(params.getUnnamed()); + ParametersImpl.registerParameters(app, new LauncherParams(getParameters(), superLauncher.getManifest())); PlatformImpl.setApplicationName(app.getClass()); superLauncher.setPhase("Application Init");