jpackage EA Build 0

Andy Herrick andy.herrick at
Sun Dec 16 18:31:34 UTC 2018

On 12/15/2018 12:44 PM, Andy Herrick wrote:
>> I have yet to find out how to specify the bundle resources. It tells 
>> to put them on the class path, but that cannot be right, as jpackage 
>> is module.
>> Using default package resource [menu icon]  (add package/movies.png 
>> to the class path to customize)
> I meant to get back to you on this.  This is an incorrect warning 
> message that needs to be fixed - I will file a bug.
> The icon should be specified by the --icon option, has nothing to do 
> with a class-path.  This is a resource for the packager not the app.
> All resources for the app should be specified by combination of 
> --input, --files, and --module-path
While investigating this, I found undocumented functionality left over 
from JavaFXPackager that may be the root of these class-path messages.

This is both dangerous and powerful, and will require some discussion 
before we either remove it or enhance and document it.

The functionality is as follows:

Some of the internal resources of jpackage (other than the Localized 
I18N properties files) may be over-ridden by files places in 

for windows this currently includes:  icon_inno_setup.bmp, 
javalogo_white_48.ico, template.iss, template.jre.iss, template.jre.wxs, 
template.wxs,  and WinLauncher.template .

There is some name translation required, for example if I run the 
following command:

jpackage create-installer exe \
--verbose --input input --output output/menu --name menu --icon 
config/awt.ico \
--win-menu --main-jar HiDPI.jar --class test.robot.RobotScreenTest 
--files HiDPI.jar  \

if file ./package/windows/menu.iss exists, ./package/windows/menu.iss 
will be used instead of 

also if ./package/windows/menu.ico exists, it will be used instead of 
config/awt.ico (or instead of javalogo_white_48.ico when no --icon is 

The bmp used in inno setup can be replaced either by adding 
package/windows/menu-setup-icon.bmp, or by modifying the appropriate 
line in ./package/windows/menu.iss

a post install script can be run for the exe installer by adding: 
./package/windows/menu-post-image.wsf (even though there is no such 
default resource).


As I said we will need to discuss this internally, and we may choose to 
just remove it, but as pointed out above, there are other installer 
parameters (mostly included in the various templates) that a user may 
wish to customize, for which there are no CLI options.

Although the current behavior of reading resources from 
"./package/<platform>/<some name substitution of resource name> is not 
really acceptable, adding a CLI option such as --resources-override 
<path> might be possible.


More information about the core-libs-dev mailing list