Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved No dock Icon Os X

Joined
Nov 3, 2013
Messages
609
Old runemate:
G2kWl5I.png


Spectre:
C0Kyap1.png
 
Mod Automation
Joined
Jul 26, 2013
Messages
3,046
I don't know what changed. We're using Swing taskbar support, since JavaFX doesn't have it yet. Needs further investigation.
 
Joined
Nov 3, 2013
Messages
609
I don't know what changed. We're using Swing taskbar support, since JavaFX doesn't have it yet. Needs further investigation.
Code:
import com.apple.eawt.Application;
...
Application application = Application.getApplication();
Image image = Toolkit.getDefaultToolkit().getImage("icon.png");
application.setDockIconImage(image);
 
Mod Automation
Joined
Jul 26, 2013
Messages
3,046
com.apple.eawt.Application
What library is this?
 
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.
 
Joined
Nov 3, 2013
Messages
609
What library is this?
 
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.
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.
 
Joined
Nov 3, 2013
Messages
609
We don't support apple's jvm implementation, only the official oracle distribution.
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
 
Mod Automation
Joined
Jul 26, 2013
Messages
3,046
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
We already have native OSX builds, so while that's a good suggestion it's already implemented. :p
 
Top