Hi Robert,<br><br>     Thank you very much for the information.<br><br>     Just want to dig more. I am using Java 6.0 & Tomcat 5.<br>     - For JChart: How I can give access to display (X Server) to Tomcat server.<br>
     - REgd JFreeChart: In which file in need to add -Djava.awt.headless=true ? I already did that in tomcat5.conf. And also I setup the same in the code before calling the JFreeChart API (System.properties("java.awt.headless","true")) <br>
    <br><br>  Appreciate your help !!!!<br><br><br>Thanks again,<br>David<br><br><br><br><br><br><div class="gmail_quote">On Sun, Sep 13, 2009 at 11:03 PM, Robert Marcano <span dir="ltr"><<a href="mailto:robert@marcanoonline.com">robert@marcanoonline.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On 09/14/2009 01:10 AM, sj david wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Fedora,<br>
</blockquote>
<br>
Hello David<br>
...<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
<br>
      I Setup the Eclipse IDE & Tomcat server on Fedora 9. I am facing<br>
following problems while enabling graphical APIs on the application:<br>
*1*. I have a running java application with JCharts on Windows which<br>
works fine with Eclipse & Tomcat server. But when I am  trying to deploy<br>
the same on Fedora 9. JCharts are not able to render & I am getting the<br>
following error:<br></div>
     : "/*Gtk Warning: cannot open display*/".<br>
</blockquote>
<br>
First, it is time to move from Fedora 9, it is not supported anymore :-)<br>
<br>
Now the problem could be that the Tomcat server is running under a user with no access to the display and that is the correct way to install it. JFreeChart uses a lot Java2D, that until Java 1.4 required to have access to a display (in Linux a X Server), but Sun introduced a in 1.4 the System property java.awt.headless that make it possible to use Java2D and many other graphic related classes/methods.<br>

<br>
You need to add the argument -Djava.awt.headless=true to the script that start Tomcat, when calling the java executable<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
If I disable the call to JCharts APIs, My application works fine. Can<br>
you please help me here.<br>
<br>
*2*. To overcome this issue, I move to another Chart API: JFreeCharts. I<br>
added the jar in the classpath & also added its java files in the<br>
project, but whenever I am running my application from Eclipse with<br>
Tomcat, Tomcat is not able to  load this JFreeChart class files, saying :<br>
<br>
*java.lang.NoClassDefFoundError*<br>
<br>
. Please help me here.<br>
<br>
<br>
Thanks<br>
David.<br>
<br>
<br></div>
------------------------------------------------------------------------<br>
<br>
--<br>
fedora-devel-java-list mailing list<br>
<a href="mailto:fedora-devel-java-list@redhat.com" target="_blank">fedora-devel-java-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/fedora-devel-java-list" target="_blank">https://www.redhat.com/mailman/listinfo/fedora-devel-java-list</a><br>
</blockquote>
<br>
--<br>
fedora-devel-java-list mailing list<br>
<a href="mailto:fedora-devel-java-list@redhat.com" target="_blank">fedora-devel-java-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/fedora-devel-java-list" target="_blank">https://www.redhat.com/mailman/listinfo/fedora-devel-java-list</a><br>
</blockquote></div><br>