Q: The graphic report failed to be displayed and exceptions occurred.
(This is about doing reports from the application. For installing
the app using the GUI setup program on Lunux, X11 support is necessary.
Use manual installation if X11 is not present, and then use the
following solution to run the application)
A: On Linux or Unix OS, an exception is thrown by the Java AWT toolkit when it
can not make a connection to an X11 server. The exception can be something like
"Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable".
If your OS has graphics support, you need make sure that the local X11 is running,
and the DISPLAY variable is correctly set.
If you are on a unix server that does not provide a graphical user environment,
there are three options:
1. Sun JDK 1.4 Headless mode
If you are using JDK 1.4, then you can use the Headless graphics mode to launch
the server, ie, you can add a java argument of -Djava.awt.headless=true.
For example, with Tomcat, add the following line in cataline.sh (or setclasspath.sh):
Note that, it seems the presense of X11 runtime libraries is still needed, that
is, an X11 environment must be installed into the system, but the X11 server
itself need not be started. For example, for RedHat Linux, the minimum set
of X11 packages needed is:
In the case of Fedora, it may use Xorg instead of XFree86. After adding headless option
and you get an error like:
libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory
then, you need install
In another case, if you get an error like
libmlib_image.so: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.security.AccessController.doPrivileged(Native Method)
then, you may have a problem with your java.library.path. One possible fix is
to add the following lines in your server start up script:
if [ -d $JAVA_HOME/jre/lib/i386 ]; then
2. Virtual X11 Frame Buffer (Xvfb)
For JDK 1.3, the headless mode is not available. If you do not have X11 sever,
you can install a lightweight Xvfb (XFree86-Xvfb package).
In your server launch script (such as tomcat.sh), add the following lines:
if [ -f /usr/X11R6/bin/Xvfb ]; then
/usr/X11R6/bin/Xvfb :1 -screen 0 1x1x8 > /dev/null 2>&1 &
3. Pure Java AWT (PJA)
Another option is PJA. For more detail and to download the software, go to
* Reference brought to you by
Bugzero, it's more than just bug tracking software!