I'm still trying to get Java2D to work on Linux. My latest strategy is
to run my GIF generation program as a servlet.
What I'm doing is firing up Xvfb to simulate an X environment but then
of course I need to set the DISPLAY environment variable for the servlet
and I'm unclear as to how I should do this.
At the moment I'm calling this in my servlet's init():
Runtime.getRuntime().exec("DISPLAY=localhost:1.1");
Runtime.getRuntime().exec("export DISPLAY");
Which I suspect is the wrong way to do it as this should be done before
the servlet starts. So the question is, how do I set this environment
variable just for the servlet?
I don't know if this is related but the servlet is generating an error
message in the JServ logs:
java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:124)
at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:63)
at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1009)
Which is giving me concern as it doesn't seem to have anything to do
with my attempts to set the DISPLAY variable...
Any suggestions on this would be greatly appreciated.
Robbie
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]