Hi Davide,

There is no such jpackage option that configures the installer to launch the app automatically after installation.

You can, however, customize wix sources jpackage uses to build the installer accordingly.

Here is how you can do it:

1. Use main.wxs file from [1] as the baseline for your custom main.wxs file.
2. Adjust it following steps from the tutorial at [2]. The tutorial applies to Wix3, but it should also work with Wix5. 3. Place your custom main.wxs file in the resource directory (use --resource-dir option of jpackage) to make jpackage use the custom main.wxs file instead of the default one.

Your question is a good candidate for a feature request, but until jpackage supports auto-launch of the installed app, manual wix sources modification is the only available option.

[1] https://github.com/openjdk/jdk/blob/master/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/main.wxs [2] https://docs.firegiant.com/wix3/howtos/ui_and_localization/run_program_after_install/

- Alexey

On 6/23/2025 10:26 AM, Davide Perini wrote:
As subject.

Using jpackage 24 with WiX Toolset 5 or 6,
how can I start the app automatically after installation is complete?

As title, is this possible?

At the moment I generate my installer with this command:

jpackage -i target --type exe --main-class org.dpsoftware.JavaFXStarter --main-jar FireflyLuciferin-jar-with-dependencies.jar --win-menu --win-menu-group Luciferin --copyright "Davide Perini" --name "Firefly Luciferin"  --vendor DPsoftware --win-dir-chooser --win-shortcut --win-per-user-install --win-upgrade-uuid 33c82dc4-e0e0-11ea-87d0-0242ac130003 --app-version "0.0.5" --win-shortcut --win-shortcut-prompt --java-options "-XX:+UseZGC -XX:+UseStringDeduplication -Xms64m -Xmx1024m"

How can I customize the installer to launch the application once the installation is finished?

Thanks
Davide

Reply via email to