logo
24.2
search
No matching documents found.
list
search
No matching documents found.
logo

Can't connect to X11 using ':99'

Expected Behavior

Application starts normally.

Actual Behavior

When trying to launch session, session is automatically getting terminated.

Exception

2019-03-13 03:17:55,383 ERROR [Webswing Process Handler] (SwingProcessImpl.java:281) [demo_anonym_829470cca8e3_1552461474257] Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server using ':99' as the value of the DISPLAY variable.
2019-03-13 03:17:55,383 ERROR [Webswing Process Handler] (SwingProcessImpl.java:281) [demo_anonym_829470cca8e3_1552461474257]         at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
2019-03-13 03:17:55,383 ERROR [Webswing Process Handler] (SwingProcessImpl.java:281) [demo_anonym_829470cca8e3_1552461474257]         at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
2019-03-13 03:17:55,383 ERROR [Webswing Process Handler] (SwingProcessImpl.java:281) [demo_anonym_829470cca8e3_1552461474257]         at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115)
2019-03-13 03:17:55,384 ERROR [Webswing Process Handler] (SwingProcessImpl.java:281) [demo_anonym_829470cca8e3_1552461474257]         at java.security.AccessController.doPrivileged(Native Method)
2019-03-13 03:17:55,384 ERROR [Webswing Process Handler] (SwingProcessImpl.java:281) [demo_anonym_829470cca8e3_1552461474257]         at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
2019-03-13 03:17:55,384 ERROR [Webswing Process Handler] (SwingProcessImpl.java:281) [demo_anonym_829470cca8e3_1552461474257]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2019-03-13 03:17:55,384 ERROR [Webswing Process Handler] (SwingProcessImpl.java:281) [demo_anonym_829470cca8e3_1552461474257]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2019-03-13 03:17:55,384 ERROR [Webswing Process Handler] (SwingProcessImpl.java:281) [demo_anonym_829470cca8e3_1552461474257]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2019-03-13 03:17:55,384 ERROR [Webswing Process Handler] (SwingProcessImpl.java:281) [demo_anonym_829470cca8e3_1552461474257]         at java.lang.reflect.Method.invoke(Method.java:498)
2019-03-13 03:17:55,385 ERROR [Webswing Process Handler] (SwingProcessImpl.java:281) [demo_anonym_829470cca8e3_1552461474257]         at org.webswing.toolkit.WebToolkit.init(WebToolkit.java:131)
2019-03-13 03:17:55,385 ERROR [Webswing Process Handler] (SwingProcessImpl.java:281) [demo_anonym_829470cca8e3_1552461474257]         at main.Main.initializeExtLibServices(Main.java:139)
2019-03-13 03:17:55,385 ERROR [Webswing Process Handler] (SwingProcessImpl.java:281) [demo_anonym_829470cca8e3_1552461474257]         at main.Main.main(Main.java:44)
2019-03-13 03:17:55,385 INFO  [Webswing Process Handler] (SwingProcessImpl.java:123) [demo_anonym_829470cca8e3_1552461474257] app process terminated.

Steps to Reproduce the Problem

  1. Install Webswing on Linux
  2. Start Webswing
  3. Start any application through browser

Solution

This means you do not have an Xvfb session running. Swing requires Xvfb on headless linux to start. Please see Starting on Linux.