1

I worked through the fabulous tutorial here: http://code.makery.ch/java/javafx-8-tutorial-part7/

I had some success in that the main application icon displays when installing, and is used for the installed application, however I have two images which seem to be left unchanged.

When the .dmg is mounted, there is an image which shows on the desktop, and another next to the application name in the title bar, both of these are still defaulting to the Java icon.

Have included screen shots to show where the correct icon shows in the installer window, but the default java one is used in the title bar of that window and in the app on the desktop.

Do I need to add new/differently named images somewhere else in the project? Or is there something additional I can put in my build.xml to ensure these images change too?

Any help would be greatly appreciated. Cheers :)

enter image description here

enter image description here

MissGeek
  • 664
  • 7
  • 10

2 Answers2

2

Have you set the icons of your stage inside your code too?

        Image icon16 = new Image(getClass().getResource("logo_16x16.png").toExternalForm());
        Image icon32 = new Image(getClass().getResource("logo_32x32.png").toExternalForm());
        Image icon64 = new Image(getClass().getResource("logo_64x64.png").toExternalForm());
        Image icon128 = new Image(getClass().getResource("logo_128x128.png").toExternalForm());
        assert icon16 != null && icon32 != null && icon64 != null && icon128 != null;
        primaryStage.getIcons().addAll(icon16, icon32, icon64, icon128);
mipa
  • 10,369
  • 2
  • 16
  • 35
  • Cheers for this. I have added this, it added an icon to my main window while the app is running (which is great). Although it didn't solve my above mentioned issue, which was occurring during installation, I'd say it was only a matter of time before this was the problem I was trying to solve. You solved the problem I didn't even know I had yet :) – MissGeek Mar 04 '15 at 03:00
2

ooh yeah, all sorted!! :)

I ran the build.xml in verbose mode: added verbose="true" to the fx:deploy tag

The console output now details which resources are being used, and where to add your own to customise.

For the above issue, the line was:

Using default package resource [volume icon] (add package/macosx/AddressApp-volume.icns to the class path to customize)

Added the AddressApp-volume.icns file to the suggested location and BAM beautiful icons everywhere!! :D

MissGeek
  • 664
  • 7
  • 10