Problems creating Graph2D objects on systems without X server
Applies to: yFiles for Java 2.7, yFiles for Java 2.6, yFiles for Java 2.5, yFiles for Java 2.4, yFiles for Java 2.3, yFiles for Java 2.2, yFiles for Java 2.1, yFiles for Java 2.0 print article email article

Type: Troubleshooting

Categories this article belongs to:
yFiles for Java > Deployment
yFiles for Java > yFiles Viewer

When running programs using Graph2D on systems without an X server, the programs crash with the following error message:
"X connection to ***.***.***.*** broken (explicit kill or server shutdown).".

This problem happens due to the fact that Graph2D normally communicates for several reasons (like getting font metrics) with the X server running on your system. If your program is executed on systems without an X server, e.g. on a server machine, this will lead to a program crash.

To avoid this problem, just tell your Java Virtual Machine to run without X server.
This is done as follows:
Note
  • For JVM 1.4 or higher, simply start the JVM with the option -Djava.awt.headless=true.
  • For JVM 1.3.x you need to start a virtual frame buffer (aka "Xvfb") and point your DISPLAY variable to that device.

Keywords: Graph2D - program - crash - x server - connection - broken

Provide feedback:
How useful was this article?    less 1 2 3 4 5 more
Email address (optional):
COPYRIGHT © 2008 yWorks · ALL RIGHTS RESERVED imprint | top | home