OS X: set application icon when launching Java/Swing application from shellscript
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?
OK, I've found the solution. I had to add the -Xdock:icon=<path> command line option.
Did you try using Window.getIconImages ?