Gif4J Products FAQ > Basics & Troubleshooting
Why do I get a "Can't connect to X11 window server" error?
This is a well-known issue on Unix systems - the Java graphical system needs a X11 server
even if you just encode(load), process and decode(save) but not display images.
The best solution is to upgrade JDK to 1.4 version ot later, which supports
graphics environment implementation.
To run graphics environment with a headless implementation, the follow property may be specified at the java command line:
For example, for tomcat 4 you can add (update) the next string within catalina.sh script:
Note: Sometimes (especially on Linux) it can require the X11 packages to be installed anyway.
If you use JDK 1.2/1.3 then you can:
- Install Xvfb:
"Xvfb is an X server that can run on machines with no display hardware and no physical input
devices. It emulates a dumb framebuffer using virtual memory."
- Install PJA Toolkit:
"PJA (Pure Java AWT) Toolkit is a JavaTM library for drawing graphics developed by eTeks. It is 100% Pure Java and doesn't use any native graphics resource of the system on which the Java Virtual Machine runs."
Find more info here