import com.oracle.bundlers.Bundlers; import com.oracle.bundlers.StandardBundlerParam; import com.sun.javafx.tools.packager.bundlers.BundleParams; import com.sun.javafx.tools.packager.bundlers.ConfigException; import com.sun.javafx.tools.packager.bundlers.RelativeFileSet; import com.sun.javafx.tools.packager.bundlers.UnsupportedPlatformException; import java.io.File; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Map; public class BundlerTestApp { static Bundlers bundlers = Bundlers.createBundlersInstance(); public static void main(String[] args) { System.out.println("File exists = " + new File("C:\\temp\\BundlerTestApp.jar").exists()); Map params = new HashMap<>(); params.put(BundleParams.PARAM_APP_RESOURCES, new RelativeFileSet(new File("C:\\temp\\"), new HashSet<>(Arrays.asList(new File("C:\\temp\\BundlerTestApp.jar"))))); params.put(StandardBundlerParam.COPYRIGHT.getID(), "Test\nAURORA"); bundlers.getBundlers() .stream() .filter(b -> { return "exe".equalsIgnoreCase(b.getID()); }) .forEach(bundler -> { try { bundler.validate(params); } catch (UnsupportedPlatformException ex) { } catch (ConfigException ex) { ex.printStackTrace(); System.out.println("bundler.getID() = " + bundler.getID()); System.exit(1); } System.out.println("[No config exception]"); System.out.println("executing: " + bundler.getID()); bundler.execute(params, new File("C:\\temp\\")); }); } }