0

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

1 Answers1

2

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!

DuncG
  • 12,137
  • 2
  • 21
  • 33
  • Well, thanks. I did look into the documentation but don't know how I missed this one. Would you please help me with [this problem](https://stackoverflow.com/questions/68067908/) as well? Thanks a lot! – Programmer Hobbyist Jun 21 '21 at 12:53
  • 1
    Someone beat me to it - hopefully you're OK now. This may also help you when re-installing so that the previous version uninstalls itself each time: [https://stackoverflow.com/questions/62675323/cannot-rerun-java-jpackage-installer-if-already-installed-second-time-just-exit/62819060#62819060] – DuncG Jun 21 '21 at 13:28
  • Yeah! [This man](https://stackoverflow.com/users/3699139/jorn-vernee) already saved me before you arrived. I became quite frustrated after that problem. And thanks for the extra tip; this is very useful as well (probably within a day or two I was going to post that question too in StackOverflow because I don't usually expect such questions to already exist). – Programmer Hobbyist Jun 21 '21 at 14:27