Resolved No dock Icon Os X

Discussion in 'Developer Support' started by Exia, Feb 9, 2016.

  1. There is no icon for spectre when it is on the dock in os x.

  2. Best Answer:
    Post #14 by Exia, Feb 10, 2016
  3. @Arbiter what is this magical dock icon and does java support it?
  4. It's essentially the task bar icon.
  5. But is there a distinction? Does the old RM have a dock icon?
  6. Old runemate:

  7. I don't know what changed. We're using Swing taskbar support, since JavaFX doesn't have it yet. Needs further investigation.
  8. Code (Text):
    1. import;
    2. ...
    3. Application application = Application.getApplication();
    4. Image image = Toolkit.getDefaultToolkit().getImage("icon.png");
    5. application.setDockIconImage(image);
  9. What library is this?
    --- Double Post Merged, Feb 10, 2016, Original Post Date: Feb 10, 2016 ---
    I'd like to avoid platform-specific implementations if possible. This worked before and I'll be satisfied to get it back to the way it was.
  10. It's one built into the apple jvm implementation: OS X Integration for Java

    In my experience, the icon has never worked. It was always what it was in the first one.
  11. We don't support apple's jvm implementation, only the official oracle distribution.
  12. I don't know how you feel about distributing jars but: How to get Apple Java Extensions ( work on JDK 7 and higher?

    Without the jar you supposedly can do this to set the menu bar title: System.setProperty("","Hello World!"); so I'm guessing there is a way to change the icon that way too.

    On the other hand, if you package the jar into a .app and provide a .icns file, os x will use that. This might be the best option for the full release. That way it really feels like to the user that os x is natively supported. I think that Apple thinks this should be the way it's done: Java Deployment Options for OS X
  13. We already have native OSX builds, so while that's a good suggestion it's already implemented. :p
  14. Well, people directly using the jar can suck it up then.

Share This Page