简体   繁体   中英

Dock icon under OSX in Java 9

I am trying to set the Dock icon in Java 9.

With previous versions of Java this was possible with something like com.apple.eawt.Application.getApplication().setDockIconImage(image); but unfortunately with Java 9 the Application class is obsolete and inaccesible (maybe also missing?).

For all other tasks found in Application class, the java.awt.Desktop class took this functionality, all but the Dock manipulation.

In JEP 272 this change is mentioned, as well as the idea that Dock is too much Apple-oriented (for me all are Apple oriented) and there is no clear explanation about it.

A Google search also has pre-9 information on how to deal with this.

Does anyone have any idea how's done now with Java 9?

你在新的java.awt.Taskbar类中尝试过setIconImage吗?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM