I modified the _Script and added -Djava.awt.headless=true, but with or without this set I got the following error:
Code:
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
---> ./_Script
java.awt.HeadlessException
at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(Unknown Source)
at processing.core.PApplet.main(PApplet.java:6888)
at _YearGenerator.main(_YearGenerator.java:83)
This is against the PJA's claim, which states that it is possible >= 1.4.
More discussion about this..
http://forum.java.sun.com/thread.jspa?threadID=444149&start=10&tstart=0
And this note from the PJA developer:
Quote:Let's try to clarify the (quite complex) situation. Let's say you want to develop an AWT servlet or application able to run on a UNIX machine. Here's the options :
...
2. If your machine has the basic X11 libs installed but no running X11 DISPLAY, you'll be able to create offscreen images using any AWT classes. With Java 1.3 or an earlier version, you can do this if you configure your JVM with java command line options to use PJAToolkit instead of the default Java toolkit. From Java 1.4, you can do this if you set the java.awt.headless System property to true.
And the smack from Sun
http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/
h3