I'd like to use Processing to render a visualization on the server side (headlessly, with no GUI). The Processing sketch is static (i.e. does not animate), so I only need to grab the first frame, and I'd like to serve this result out to the users of our web application on-demand.
I've searched around a bit on the processing.org forums and it's been suggested that Processing is not intended to be launched headlessly. The only hack I've seen to do it is one involving launching a headless X11 display:
Xvfb :2 &
export DISPLAY=":2"
./myapp
killall -9 Xvfb
.. Which is not going to work for us as we'd like to have a pure-Java solution and can't always guarantee an X renderer on the server-side.
How do I do this in pure Java?