From 30f8fda05cecb32344c9d1732b64844629db16bc Mon Sep 17 00:00:00 2001 From: Axel Howind Date: Thu, 31 Jan 2019 07:43:15 +0100 Subject: [PATCH 1/4] add javax.xml.bind for Java 9+ --- pom.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pom.xml b/pom.xml index 3caeebc..6a7918b 100644 --- a/pom.xml +++ b/pom.xml @@ -129,6 +129,14 @@ + + + javax.xml.bind + jaxb-api + 2.3.0 + + + UTF-8 1.8 From 6d48fe7860f9616aa34536437a0ed0121d115af4 Mon Sep 17 00:00:00 2001 From: Axel Howind Date: Thu, 31 Jan 2019 08:04:24 +0100 Subject: [PATCH 2/4] set compile classpath for Java 9+ --- pom.xml | 54 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 6a7918b..d401826 100644 --- a/pom.xml +++ b/pom.xml @@ -129,14 +129,52 @@ - - - javax.xml.bind - jaxb-api - 2.3.0 - - - + + + + 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 From 9bcc310f27c17aadbe6ea7bf188df9646da35362 Mon Sep 17 00:00:00 2001 From: Axel Howind Date: Thu, 31 Jan 2019 13:58:33 +0100 Subject: [PATCH 3/4] move Main method to own class (to support running on Java 11) --- pom.xml | 2 +- src/main/java/fxlauncher/Launcher.java | 4 ---- src/main/java/fxlauncher/Main.java | 7 +++++++ 3 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 src/main/java/fxlauncher/Main.java diff --git a/pom.xml b/pom.xml index d401826..179f080 100644 --- a/pom.xml +++ b/pom.xml @@ -79,7 +79,7 @@ - fxlauncher.Launcher + fxlauncher.Main diff --git a/src/main/java/fxlauncher/Launcher.java b/src/main/java/fxlauncher/Launcher.java index fc36bd7..ebef926 100644 --- a/src/main/java/fxlauncher/Launcher.java +++ b/src/main/java/fxlauncher/Launcher.java @@ -208,10 +208,6 @@ private void showWhatsNewDialog(String whatsNewURL) { alert.showAndWait(); } - public static void main(String[] args) { - launch(args); - } - private void createUpdateWrapper() { superLauncher.setPhase("Update Wrapper Creation"); diff --git a/src/main/java/fxlauncher/Main.java b/src/main/java/fxlauncher/Main.java new file mode 100644 index 0000000..9b29579 --- /dev/null +++ b/src/main/java/fxlauncher/Main.java @@ -0,0 +1,7 @@ +package fxlauncher; + +public class Main { + public static void main(String[] args) { + Launcher.launch(Launcher.class, args); + } +} \ No newline at end of file From 4e13da38c19694921dede5e8ada12fc34b63341e Mon Sep 17 00:00:00 2001 From: Axel Howind Date: Fri, 1 Feb 2019 05:49:01 +0100 Subject: [PATCH 4/4] revert incompatible changes --- pom.xml | 2 +- src/main/java/fxlauncher/Launcher.java | 36 ++++++++++++++------------ src/main/java/fxlauncher/Main.java | 7 ----- 3 files changed, 20 insertions(+), 25 deletions(-) delete mode 100644 src/main/java/fxlauncher/Main.java diff --git a/pom.xml b/pom.xml index 179f080..d401826 100644 --- a/pom.xml +++ b/pom.xml @@ -79,7 +79,7 @@ - fxlauncher.Main + fxlauncher.Launcher diff --git a/src/main/java/fxlauncher/Launcher.java b/src/main/java/fxlauncher/Launcher.java index ebef926..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(); @@ -208,6 +209,10 @@ private void showWhatsNewDialog(String whatsNewURL) { alert.showAndWait(); } + public static void main(String[] args) { + launch(args); + } + private void createUpdateWrapper() { superLauncher.setPhase("Update Wrapper Creation"); @@ -232,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"); diff --git a/src/main/java/fxlauncher/Main.java b/src/main/java/fxlauncher/Main.java deleted file mode 100644 index 9b29579..0000000 --- a/src/main/java/fxlauncher/Main.java +++ /dev/null @@ -1,7 +0,0 @@ -package fxlauncher; - -public class Main { - public static void main(String[] args) { - Launcher.launch(Launcher.class, args); - } -} \ No newline at end of file