For the longest time, I’ve been having issues with the Dock Icon on OSX. It isn’t set using the same code that works in Windows and Linux, but I think I’ve finally figured it out.
Using information from this blog post, I can use the com.apple.eawt.Application
class to set the Dock Icon. It isn’t set immediately on launch, but shortly thereafter. Not perfect, but close.