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

I just struggled with the same issue using Zonsky's great javafx-maven-plugin. As of version 1.5, which you also were using, the src/main/deploy directory will be added to the classpath. The icon you want to use could be added there and it will be available on the classpath for the native builder!

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

For you:

  1. Create src/main/deploy/package/windows/ folder
  2. Add icon with name ${project.build.finalName}.ico
  3. 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 <icon>...</icon> section in the config section seems to be for webstart, so I haven't been using it. Hope you get it to work!