jpackage add files to installdir

1.1k views Asked by At

I'm using jpackage from Java 15 to create an installer for my javafx application. Because one of the libraries requires some visual c++ dlls, I want to include them too. They should be placed into the directory where the main .exe and .ico resides.

I don't understand how to write an overrides.wxi to achieve that. https://docs.oracle.com/en/java/javase/14/jpackage/override-jpackage-resources.html#GUID-1B718F8B-B68D-4D46-B1DB-003D7729AAB6 Here is all information I found about this.

1

There are 1 answers

2
Saeid Nourian On BEST ANSWER

The easiest solution is to include your dll in your "input" folder and to change the library.path to include that folder via jpackage $APPDIR parameter like this:

jpackage --input input --java-options '-Djava.library.path=$APPDIR' ...

This is how I did it for my own project that needs dll and it works.