EventQueue.invokeLater requires use of X11

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P5
    • None
    • Affects Version/s: 1.4.0
    • Component/s: client-libs
    • None
    • sparc
    • solaris_9

      I want to use EventQueue to queue events. It is advertised
      as a generalized queue that operates on a specific thread.
      When I use it on a machine without an X display using the
      following code:

      public class a
      {
          public static void main(String[] args)
              {
              java.awt.EventQueue.invokeLater(new Runnable() {
                  public void run()
                      { System.out.println("here"); }
              });
          }
      }

      I get:

      Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':1.0' as the value of the DISPLAY variable.
              at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
              at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:126)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:130)
              at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
              at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:70)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:130)
              at java.awt.Toolkit$2.run(Toolkit.java:712)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:703)
              at java.awt.Toolkit.getEventQueue(Toolkit.java:1479)
              at java.awt.EventQueue.invokeLater(EventQueue.java:757)
              at a.main(a.java:5)

            Assignee:
            Oleg Sukhodolsky (Inactive)
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: