The use of Jfreechart-built reports, under window can be normal display, but put on Linux under the error, and sometimes the Tomcat hung off,
The reason for this is that Jfreechart needs to access the graphical capabilities provided by the Java AWT Library in Linux, and most versions of the Java AWT Class library under Linux require some of the features provided by X server. And the system that basically makes the server does not start X server (even not install at all).
The error is as follows:
X connection to localhost:11.0 broken (explicit kill or server shutdown).
My workaround is as follows: The following files are found in the Linux directory:
Vi/etc/profile
At the end add: Export catalina_opts= '-djava.awt.headless=true '
Two. Chinese garbled problem
User figures, funds accounted for the use of jfreechart developed images, Chinese display as garbled
Cause of the problem:
The Jdk6 (JRE) on Linux does not natively support Chinese.
Problem solving:
1) C:\WINDOWS\FONTS\simsun.ttc the font under XP (that is, Arial, size 10M) and rename it to Simsun.ttf.
2) Copy Simsun.ttf font to/usr/share/fonts/zh_cn/truetype/
3) execute under the Linux command line:
fc-cache/usr/share/fonts/zh_cn/truetype/font installation is complete, you can use this font.
Jfreechart does not display in Linux and Chinese garbled problem