Fix Version/s: 18
Compatibility Risk Description:The enhancement describes an additional jpackage option and will have no impact when that new option is not used.
Interface Kind:add/remove/modify command line option
Add an option to jpackage, "--app-content" that will allow adding arbitrary content (individual files, and/or directories and their content) to the payload of an application packaged ny jpackage.
Some tools require specific configuration files in the root or Contents directory of an application, and some customers have requested the ability to add README files or source trees to their packaged bundle.
Add a command line option to jpackage to allow adding arbitrary content to an app-image.
The following option to jpackage:
--app-content <additional content>[,<additional content>...] A comma separated list of paths to files and/or directories to add to the application payload. This option can be used more than once.
Jpackage will add the additional content to the application at the same level as the "runtime" or "app" directories as follows:
On Windows: in the top level app-image directory.
On macosx: in the "Contents" directory of the app-image.
On linux: in the "lib" directory of the app-image.
On macosx when signing is used, the content is added before the app-image is signed, so the added content can be signed by jpackage.
If the content is a directory, that directory and all it's contents (recursively) will be added. If the directory already exists in the app-image (such as "app" or "runtime") then it's content will still be added to the existing directory in the app-image, however if a file already exists (such as ("app/,cfg" or "runtime/release") the file will not be overwritten and an Exception will be thrown.