Hello David/All,
I am very sad to know about the performence of JFreeCharts on Linux server ,as this liberary uses awt classes which requires Xwindows on Linux platform. On running a siple chart i am getting a weird exception saying ...as
Unalbe ot connect X11 '0.0 ' server .
sun.awt...........................................
I am surperised why JfreeCharts devlopers didnt use Swing for rendering the Graphics .?
Is there any way to solve this problem .
I am thinkng to modify some classes which use Awt and replace them to use wiht some Swing ones .
Any idea will be highly apprecieated ....
Best Regards .
Awais Bawja
JFreeCharts fails on Linux ????
Re: JFreeCharts fails on Linux ????
Hi Awais,
have you read
http://www.object-refinery.com/phorum-3 ... 987&t=2987
?
Swing uses java.awt.Graphics2D Instances too, or am i wrong?
If it does, the problem will remain the same, even with swing.
Regards,
Andreas Schroeder
have you read
http://www.object-refinery.com/phorum-3 ... 987&t=2987
?
Swing uses java.awt.Graphics2D Instances too, or am i wrong?
If it does, the problem will remain the same, even with swing.
Regards,
Andreas Schroeder
Re: JFreeCharts fails on Linux ????
Andreas is correct. The problem isn't AWT vs Swing, or JFreeChart itself, but is due to the way graphics routines have been implemented in Java prior to JDK 1.4. And the link Andreas supplied summarises the solutions.
Regards,
DG.
Regards,
DG.
Re: JFreeCharts fails on Linux ????
Hello Andreas/David,
Thanks Andreas and David ,you both are correct . I have got the solution and Now JFreeCharts are running on my RH Linux 7.2 server .
Under JRE 1.4, setting the "headless" property to true allows JFreeChart to render charts in the absence of an X11 instance.
i did that using
*****************************************
System.setProperty("java.awt.headless","true");
*****************************************
For servlets, you can use set the property in the command line that invokes the servlet container:
java -Djava.awt.headless=true ...
In tomcat 4, the catalina.sh script can use an environment setting:
setenv CATALINA_OPTS -Djava.awt.headless=true
Regards
Awais Bajwa
Thanks Andreas and David ,you both are correct . I have got the solution and Now JFreeCharts are running on my RH Linux 7.2 server .
Under JRE 1.4, setting the "headless" property to true allows JFreeChart to render charts in the absence of an X11 instance.
i did that using
*****************************************
System.setProperty("java.awt.headless","true");
*****************************************
For servlets, you can use set the property in the command line that invokes the servlet container:
java -Djava.awt.headless=true ...
In tomcat 4, the catalina.sh script can use an environment setting:
setenv CATALINA_OPTS -Djava.awt.headless=true
Regards
Awais Bajwa