--add-modules
declaration)--add-opens
declarations--add-exports
declarationsAppLauncher
program) with customized arguments specified in a configuration file:AppLauncher
class and all its dependencies is on the AppLauncher.jar
package. It has no dependencies on other packages.public class MyAppLauncher extends AppLauncher { public AppLauncher(String[] args) { super(args); } public static void main(String[] args) { MyAppLauncher launcher = new MyAppLauncher(args); launcher.setAddModules("javafx.controls,javafx.fxml,javafx.graphics,javafx.swing,javafx.web"); launcher.setAddOpensAllUnnamed("javafx.web/javafx.scene.web", "javafx.web/com.sun.webkit"); launcher.requireJavaVersion("17-"); launcher.start(); } @Override protected String getLaunchable() { return "MyApplication.jar"; } @Override protected String getConfigurationFile() { return "confFile.conf"; } }And the following code in the
confFile.conf
file:JAVAHOME=L:\WRK\Java\Tools\jdk-17.0.2 JAVAFXLIB=L:\WRK\Java\Tools\javafx17\lib
Copyright 2006-2024 Herve Girod. All Rights Reserved. Documentation and source under the LGPL v2 and Apache 2.0 licences