How can I change the icon used by javapackager for .pkg installers?

1.2k views Asked by At

Using javapackager under Mac OS X 10.12, I can generate a .pkg file. This package, when opened, contains a generic gray-colored icon, as shown in the image below:

enter image description here

How can I change the generic icon to one of my own choosing? I am currently using the option -Bicon=.... to set an icon, which works for the application icon but does not appear to change the icon in the .pkg file. There do not appear to be any other icon-related options documented in Oracle's documentation for javapackager.

1

There are 1 answers

0
jbilander On

If you create a folder structure package/macosx and put a .png file inside that folder with the naming-convention MyAppName-background.png (replace MyAppName with your app name) the javapackager will pick it up. You can also put a .icns file MyAppName.icns in that same folder and it will be used for the application icon and in dmg-packaging if you would like to you use that too.