How to use "resource-dir" option for jpackage?

Andy Herrick andy.herrick at oracle.com
Wed Oct 9 17:09:37 UTC 2019


On 10/9/2019 10:58 AM, Andrey Volkov wrote:
> Hello.
>
> Can you give a hint or en example how to use --resource-dir option for
> jpackage?
> According to the help, it is possible to override jpackage's resources
> (icons, logos, etc. that are shown in installers). Is it right?

generally yes, if the logo is loaded from an internal resource, you 
should be able to override it in this way.

On Windows the msi installer has no images that come from jpackage 
resources, so will use macOS for an example.

I run:

> jpackage --name mjar-test --module me.mymodule/me.mymodule.Main 
> --module-path mjars/mjar.jar --verbose
>
then as part of the verbose output I see:

> Using default package resource background dmg.png [dmg background] add 
> mjar-test-background.png to the resource dir to customize.
>
so I create a dir "resources" and I put my image file in it as 
mjar-test-background.png then I re-run with command:

> jpackage --name mjar-test --resource-dir resources --module 
> me.mymodule/me.mymodule.Main --module-path mjars/mjar.jar --verbose
>
And now it should create  dmg installer with your customized dmg 
background image.


/Andy




More information about the core-libs-dev mailing list