Screaming Headless Servers

Posted on May 18, 2004


If you’re working with a server-side application, like I am, that imports a javax.swing package, you might get strange errors, such as the one described here. javax.swing packages expect to find an X11 server running on the machine. In my case, it wants to access the graphical subsystem because JFreeReport wants to use a TableModel as a kind of spreadsheet.


append java.awt.headless=true to your JAVA_OPTS in Mine ended up looking like this.

JAVA_OPTS = "$JAVA_OPTS -Djava.awt.headless=true"