A big problem when runing in linux,pls..help me...

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Emily

A big problem when runing in linux,pls..help me...

Post by Emily » Sun Jul 18, 2004 5:14 pm

Hi,all!

I'm a JFC user and just made a servlet by using JFC.
Everything went smoothly when I run it on WinXP(with tomcat4.1),I saw the pie chart as what I expected.
but after
my moving the servlet into a pc based on RH-linux(with tomcat4.1),an error occured,and tomcat reminded me like this:////
root cause
java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.////
I can make sure that the versions of JFC and Jcommon I used are same~~
Who can help me solve the hazard~~ :(
Thanks a lottttt!!!

Karthicks
Posts: 20
Joined: Wed Mar 26, 2003 1:29 pm
Location: Chennai , India

Post by Karthicks » Mon Jul 19, 2004 10:05 am

Hi ,

This is due display error. Probabily you would have run the tomcat server in non x mode (you would have telnet the machine and started the tomcat server in non x mode).

solutions ,

1) start the server in x mode (konsole /prompt etc)
2) Or export DISPALY to the client machine from which you connect to the server. Eg export DISPLAY=karthick:0.0
3) Or set a system parameter to tomcat server vm while start up -Djava.awt.headless=true. I am not sure , i think it will affect the performance It may involve sync method call of the ui classes internally.


I hope your problem could be solved by the above said solution.

S.Karthick

Emily

thank you!

Post by Emily » Tue Jul 20, 2004 8:37 am

Hi,Karthicks!Thanks a lot! :P
By what u mentioned above,I succeed!

Guest

Post by Guest » Wed Jul 21, 2004 9:41 pm

The following code at the init() methos of the servlet also fix the problem:
System.setProperty("java.awt.headless", "true");

Locked