This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Since I just hit my head against the wall for a couple of hours, I'll see if I can spare others the trouble. (Cudos to Janne for hints on this one.)

Problem:

You want to generate dynamic graphics in a command line app, or a servlet, in unix, never actually displaying anything. You get a "connection to X11 server refused" error, because an X server is not running or you don't have permissions to it.

Solution:

JDK1.4:

start Java with -Djava.awt.headless=true See http://java.sun.com/j2se/1.4/docs/guide/awt/AWTChanges.html#headless

Older JDK's:

See if you can install xvfb, a virtual X server, made for nasty software just like AWT-based Java. Or, see if you can use PJA, see http://www.eteks.com/pja/en/index.jsp.

Argh. I HATE AWT!

Text by ebu.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 25-Jan-2002 16:16 by 192.100.124.219.