1

Until now I used JavaApplicationStub inside a .app directory structure to launch our Java/Swing application on OS X. The dock icon configured in the Info.plist works fine.

Now I've tried to launch the application using a shell-script inside the .app directory structure, but the dock icon only shows the one configured in Info.plist for a very short time and then falls back to the Java default icon. What I need to do that the configured icon remains there?

Mot
  • 28,248
  • 23
  • 84
  • 121

2 Answers2

1

OK, I've found the solution. I had to add the -Xdock:icon=<path> command line option.

Mot
  • 28,248
  • 23
  • 84
  • 121
0

Did you try using Window.getIconImages ?

Wim Deblauwe
  • 25,113
  • 20
  • 133
  • 211
  • No, I just used the same application code as before which worked fine with `JavaApplicationStub`. – Mot Jul 17 '12 at 11:29