T
Toralf Kirsten
Hi,
I'd like to create an image on a Unix server and save it to file.
This file then should be loaded within a Html file generated by a Java
Servlet using the Tomcat server.
For this purpose I use the classes
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
....
Buffered img = new BufferedImage(width, height,
BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = img.createGraphics();
But on the Unix system I got the following error:
Screen:
-------
java.lang.NoClassDefFoundError
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:140)
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1041)
...
Catalina.log:
-------------
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
My question is, where can/should I set the DISPLAY variable, e.g. in the
Unix, Tomcat or Java environment?
Any suggestions are welcome. Thanks, Toralf
I'd like to create an image on a Unix server and save it to file.
This file then should be loaded within a Html file generated by a Java
Servlet using the Tomcat server.
For this purpose I use the classes
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
....
Buffered img = new BufferedImage(width, height,
BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = img.createGraphics();
But on the Unix system I got the following error:
Screen:
-------
java.lang.NoClassDefFoundError
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:140)
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1041)
...
Catalina.log:
-------------
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
My question is, where can/should I set the DISPLAY variable, e.g. in the
Unix, Tomcat or Java environment?
Any suggestions are welcome. Thanks, Toralf