Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8024701

On some machines SystemTray.add throws exception although Java reports that SystemTray is supported

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux

      Description

      The issue can be observed with Java 7u1 on emb-spb-atom-d2700-1.ru.oracle.com

      The attached program verifies that SystemTray is supported, then creates a TrayIcon, then adds the icon to the system tray.

      However, when adding it throws AWTException which is unexpected since SystemTray is supported.

      To reproduce login to emb-spb-atom-d2700-1.ru.oracle.com, put the attached program and the attached gif into the same folder and compile and run the program.

      Below is the log from the attached program:

      $ ejdk1.7.0/bin/java SysTrayTest
      tray supported=true
      tray=java.awt.SystemTray@188c5c2
      image=sun.awt.image.ToolkitImage@36f58e
      icon=java.awt.TrayIcon@c5e234
      failed
      java.awt.AWTException: TrayIcon couldn't be displayed.
      at sun.awt.X11.XTrayIconPeer.<init>(XTrayIconPeer.java:254)
      at sun.awt.X11.XToolkit.createTrayIcon(XToolkit.java:1144)
      at java.awt.TrayIcon.addNotify(TrayIcon.java:689)
      at java.awt.SystemTray.add(SystemTray.java:263)
      at SysTrayTest.main(SysTrayTest.java:37)
      Done


        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              akulyakh Alexander Kulyakhtin (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: