Panayotis
Panayotis

Reputation: 1862

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?

Upvotes: 5

Views: 1267

Answers (1)

Snowy_1803
Snowy_1803

Reputation: 766

Have you tried setIconImage in the new java.awt.Taskbar class?

Upvotes: 7

Related Questions