In Java 8 I can launch a JavaFX application with a preloader using the following method:
LauncherImpl.launchApplication(WindowMain.class, WindowMainPreloader.class,
new String[]{...});
I prefer to start it from code, like above, instead of using a deploy configuration, because I don't want the graphical interface to start every time I start the application, but only after some code that has computed that the application should run in GUI mode.
I was using the class "com.sun.javafx.application.LauncherImpl", but apparently in Java 9 all classes starting with "com.sun" are removed. So, how can I start the application with the preloader in Java 9?