7

I am trying to chance the icon of the exe file created native bundling of javafx packaging but it still contains the default icon. Please suggest

 primaryStage.getIcons().add(FileUtility.loadImage("icon.png"));

did not help, it only changes the title bar and task bar icon.

default icons

The ico file still gets generated and icon of the exe files remains the default one

I also tried to assign an icon in the project properties-> Deployment-> icon but did not help

Neil
  • 5,919
  • 15
  • 58
  • 85
  • http://stackoverflow.com/questions/10121991/javafx-2-application-icon – invariant Nov 12 '12 at 15:01
  • 1
    Yes, finally I moved to launch4j to create exe with icon – Neil Nov 19 '12 at 04:26
  • Perhaps you are looking for this: http://www.jrsoftware.org/ishelp/index.php?topic=setup_setupiconfile ? In order to produce the exe setup, one must use InnoSetup according to JavaFX docs and you can customize the icon in InnoSetup configuration using link I gave. – Software Guy Dec 01 '12 at 22:45

3 Answers3

3

I believe I have encountered the same issue and the solution is described in the following thread.

As a side note - neither specifying your icon in the build.xml file or via the project's options in the deployment section is going to work thus far, but it seems to be fixed in the upcoming release of 7u10.

Community
  • 1
  • 1
XXL
  • 1,224
  • 4
  • 12
  • 25
0

I added response here How to set custom icon for javafx native package icon on Windows and thinks it is the same issue you started out with. However you seem to have moved on, but others might find it interesting...

Community
  • 1
  • 1
gaeste
  • 146
  • 6
  • @Mateusz I don't know how to make a comment since I don't have that as an option - only `share | edit` is visible to me. Except on my own posts. – gaeste May 13 '13 at 12:54
0

I added src/main/deploy/package/windows/myapp.ico there and it finally worked :)

For you:

Create src/main/deploy/package/windows/ folder Add icon with name ${project.build.finalName}.ico Run mvn jfx:build-native I haven't played with it extensively - just got it to work and wanted to share. So if you want to use icon with different name, I don't know how. Not yet at least. The ... section in the config section seems to be for webstart, so I haven't been using it. Hope you get it to work!

Answered at How to set custom icon for javafx native package icon on Windows

Community
  • 1
  • 1
user1859806
  • 213
  • 1
  • 2
  • 8