When there is a "--files" argument, all the jar files listed as input files are added to the classpath used to launch the app (added to the "app.classpath" line under "[Application]" in the application's ".cfg" file).
Without a "--files" arg, the entire "--input" directory's contents are copied to the app image, but only the jars directly in the top level of "--input" are added to the "app.classpath in the config file.
as a result a simple app such as the following will run fine:
jpackage create-image \
--input input \
--output output \
--name sub \
--class myapp.hello \
--main-jar 'myapp\myapp.jar' \
--files 'myapp\myapp.jar' \
whereas the following app will not run:
jpackage create-image \
--input input \
--output output \
--name sub1 \
--class myapp.hello \
--main-jar 'myapp\myapp.jar' \
Without a "--files" arg, the entire "--input" directory's contents are copied to the app image, but only the jars directly in the top level of "--input" are added to the "app.classpath in the config file.
as a result a simple app such as the following will run fine:
jpackage create-image \
--input input \
--output output \
--name sub \
--class myapp.hello \
--main-jar 'myapp\myapp.jar' \
--files 'myapp\myapp.jar' \
whereas the following app will not run:
jpackage create-image \
--input input \
--output output \
--name sub1 \
--class myapp.hello \
--main-jar 'myapp\myapp.jar' \