title: Can't connect to X11 window server
body: <p>I'm trying to run a Java application on Xubuntu 14.04, but I always get</p>
  
  <pre><code>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 sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
  at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:110)
  at java.security.AccessController.doPrivileged(Native Method)
  at sun.awt.X11GraphicsEnvironment.&lt;clinit&gt;(X11GraphicsEnvironment.java:74)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:190)
  at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
  at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
  at sun.awt.X11.XToolkit.&lt;clinit&gt;(XToolkit.java:119)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:190)
  at java.awt.Toolkit$2.run(Toolkit.java:868)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:860)
  </code></pre>
  
  <p>echo $DISPLAY returns :0.0</p>
  
  <p>What could be wrong here?</p>