1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Resolved No dock Icon Os X

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

  1. Exia

    Joined:
    Nov 3, 2013
    Messages:
    609
    Likes Received:
    259
    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. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    @Arbiter what is this magical dock icon and does java support it?
     
  4. Exia

    Joined:
    Nov 3, 2013
    Messages:
    609
    Likes Received:
    259
    It's essentially the task bar icon.
     
  5. Savior

    Savior Java Warlord

    Joined:
    Nov 17, 2014
    Messages:
    4,906
    Likes Received:
    2,748
  6. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    But is there a distinction? Does the old RM have a dock icon?
     
  7. Exia

    Joined:
    Nov 3, 2013
    Messages:
    609
    Likes Received:
    259
    Old runemate:
    [​IMG]

    Spectre:
    [​IMG]
     
  8. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,937
    Likes Received:
    1,266
    I don't know what changed. We're using Swing taskbar support, since JavaFX doesn't have it yet. Needs further investigation.
     
  9. Exia

    Joined:
    Nov 3, 2013
    Messages:
    609
    Likes Received:
    259
    Code (Text):
    1. import com.apple.eawt.Application;
    2. ...
    3. Application application = Application.getApplication();
    4. Image image = Toolkit.getDefaultToolkit().getImage("icon.png");
    5. application.setDockIconImage(image);
     
  10. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,937
    Likes Received:
    1,266
    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.
     
  11. Exia

    Joined:
    Nov 3, 2013
    Messages:
    609
    Likes Received:
    259
    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.
     
  12. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    We don't support apple's jvm implementation, only the official oracle distribution.
     
  13. Exia

    Joined:
    Nov 3, 2013
    Messages:
    609
    Likes Received:
    259
    I don't know how you feel about distributing jars but: How to get Apple Java Extensions (com.apple.eawt) work on JDK 7 and higher?

    Without the jar you supposedly can do this to set the menu bar title: System.setProperty("com.apple.mrj.application.apple.menu.about.name","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
     
  14. Arbiter

    Arbiter Mod Automation

    Joined:
    Jul 26, 2013
    Messages:
    2,937
    Likes Received:
    1,266
    We already have native OSX builds, so while that's a good suggestion it's already implemented. :p
     
  15. Exia

    Joined:
    Nov 3, 2013
    Messages:
    609
    Likes Received:
    259
    Well, people directly using the jar can suck it up then.
     

Share This Page

Loading...