

Tomcat is installed into: /home/user/tomcatġ.

Java is installed into: /usr/local/jdk1.2.2 You can now run graphical servlets such as Eas圜hart's ChartServlet on a headless Linux server. The Xvfb should now be installed properly. Set the DISPLAY variable to point to localhost:0 Xvfb :0 where 0 is the X-windows display number.ģ. Install Xvfb in a directory on your linux computerĢ. You can also get Xvfb source at ftp.x.org and compile it.ġ. Distributions for other Unix systems can also be found at. Image image = chart.createImage(width, height) įor more info about java headless support look at Graphics2D g2D = (Graphics2D)image.getGraphics() Image image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB) Note: If you are not using ChartServlet but your own servlet which gets the chart image from Chart.class then the image should be created in the following way: JAVACMD=$JAVA_HOME/bin/java in tomcat.sh file The follow property may be specified at the java command line: If you want to run ChartServlet on a linux computer without X-Windows, you can use one of the folloing options:ġ.Use Eas圜harts 3.0 and J2SE 1.4.0 or higher.Ģ.Install Xvbf - a virtual X server which can run on machines without display or physical graphical devices.ģ.Install PJA - Pure Java AWT replacement library. A servlet executed on a unix server without X installed or running will throw an exception. Q:How do I use Eas圜harts on Unix without X-Windows installed?Ī:Java's AWT (graphical system) needs an underlaying graphical architecture such as X-Windows to work.
