I have a problem with JFreeChart in a servlet :
the servlet servor is running on a secure host without X servor.
I have the message "Can't connect to X11 window server"
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
...
at com.jrefinery.chart.JFreeChart.createVerticalBarChart
...
It is possible to use JFreeChart without X access ?
Use JFreeChart in a servlet (without display)
RE: Use JFreeChart in a servlet (without display)
Yes,
you can use jfreechart without X, use the Pure Java AWT
(pja) see http://www.eteks.com/
cheers
timp
you can use jfreechart without X, use the Pure Java AWT
(pja) see http://www.eteks.com/
cheers
timp
RE: Use JFreeChart in a servlet (without display)
Yes,
you can use jfreechart without X, use the Pure Java AWT
(pja) see http://www.eteks.com/
cheers
timp
you can use jfreechart without X, use the Pure Java AWT
(pja) see http://www.eteks.com/
cheers
timp
RE: Use JFreeChart in a servlet (without display)
Is there a performance hit to use the pja?
Thanks,
Matthew
Thanks,
Matthew
RE: Use JFreeChart in a servlet (without display)
Thanks, it's work fine.
It should be in the documentation (but perhaps it is already ?).
It should be in the documentation (but perhaps it is already ?).
RE: Use JFreeChart in a servlet (without display)
If you're concerned with licensing (and PJA is GPL not LGPL)
you can run Xvfb -- an X virtual frame buffer which exists for numerous platforms. Xvfb is essentially a monitor-less X server. You can do things like "xterm" and it starts up with the xterm displaying nowhere.
This works fine with the jfreechart lib for me.
- Chris
you can run Xvfb -- an X virtual frame buffer which exists for numerous platforms. Xvfb is essentially a monitor-less X server. You can do things like "xterm" and it starts up with the xterm displaying nowhere.
This works fine with the jfreechart lib for me.
- Chris
RE: Use JFreeChart in a servlet (without display)
This issue is also addressed in the Java2D FAQ. Basically, the new jdk1.4 handles this problem with a new 'headless' system property setting.
http://java.sun.com/products/java-media ... .html#xvfb
http://java.sun.com/products/java-media ... .html#xvfb