<AWT Dev> [RFC] Tray icons for applications are not displayed in the GNOME notification bar.

Anthony Petrov anthony.petrov at oracle.com
Fri Oct 21 04:43:43 PDT 2011

Hi Danesh,

Overall, the fix looks reasonable. However, I see a problem with using 
the RuntimeMXBean.getName() method to obtain the information we need, 
because the specification of the method states:

> Returns the name representing the running Java virtual machine. The returned name string can be any arbitrary string and a Java virtual machine implementation can choose to embed platform-specific useful information in the returned name string. Each running virtual machine could have a different name.

There's no any guarantees regarding the format of the string returned. 
Which means that if the XToolkit code is going to be run with a VM other 
than, say, Hotspot, the method may return a differently formatted 
string, and hence this code may fail.

Is there a more robust way to obtain the PID and the client FQDN?

best regards,

On 10/21/2011 12:03 AM, Danesh Dadachanji wrote:
> Hi,
> There's a bug[1] with java tray icons and the new gnome-shell, the icon 
> is no longer displayed. GNOME has adapted an additional spec[2] from the 
> freedesktop standards for its notification bar (system tray). It now 
> requires the XAtom _NET_WM_PID to be set, which in turn needs 
> WM_CLIENT_MACHINE. If they aren't then things don't go smoothly and the 
> bar won't show the icon/embedded frame.
> The following webrev fixes the bug:
> http://icedtea.classpath.org/~ddadacha/tray_icon/
> This bug is also in jdk6 and 7 as well FWIW.
> I would appreciate any comments!
> Regards,
> Danesh
> [1] Original bug report - 
> https://bugzilla.redhat.com/show_bug.cgi?id=683768
> [2] http://standards.freedesktop.org/wm-spec/1.3/ar01s05.html#id2523510

More information about the awt-dev mailing list