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

Creating a java.awt.Applet tries to connect to X server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 1.2.0
    • tools
    • None

      If you try to create a new Applet, and there's no available window environment,
      the initializer will fail with an InternalError. (unset DISPLAY, xhost -, create
      applet object under Solaris.)

      This is a side-effect of Component really, but I want a sandbox that I can run
      in the JavaTest framework without needing a GUI. If not Applet, then what?

      java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the
      value of the DISPLAY variable.
              at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
              at
              at java.lang.Class.forName(Native Method)
              at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi
      ronment.java:58)
              at
              at java.lang.Class.forName(Native Method)
              at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:468)
              at java.awt.Cursor.<init>(Cursor.java:284)
              at java.awt.Cursor.getPredefinedCursor(Cursor.java:199)
              at java.awt.Component.<init>(Component.java:128)
              at java.awt.Container.<init>(Container.java:88)
              at java.awt.Panel.<init>(Panel.java:59)
              at java.awt.Panel.<init>(Panel.java:51)
              at java.applet.Applet.<init>(Applet.java:39)
              at AppletServer.<init>(AppletServer.java:33)
              at AppletServer.main(AppletServer.java:131)

            son Oleg Sukhodolsky (Inactive)
            acolleysunw Adrian Colley (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: