javainstallation-packagejpackageinstallation-path

How to set custom installation directory for a java application that is installed by a packaged installer(created with Jpackage)?


I packaged my java app using jpackage. When I install it with the packaged installer, the directory after the installation is always C:\Program Files\<program name>.How do I change it?

Let me clarify once more, that I am not talking about the output directory where the packaged installer's exe file should be located once the packaging is done. I am talking about the directory where that packaged installer exe extracts its content after double-clicking it, which is by default C:\Program Files\<program name>.

Regards,

Fida


Solution

  • Add --win-dir-chooser parameter. Reading the documentation for jpackage or using jpackage --help would get this answer this faster than you can type this question on Stackoverflow!