Solution to the Problem of not displaying images and Chinese characters in JFreeChart and JasperReports in Linux
Source: Internet
Author: User
JFreeChart and JasperReports are not displayed in Linux and solutions to Chinese problems-general Linux technology-Linux technology and application information. For more information, see the following. If X is not enabled, JFreeChart or JasperReports may not be displayed normally.
I. display the solution to the problem
Set the Java startup parameter "-Djava. awt. headless = true". Take Tomcat as an example:
Set CATALINA_OPTS = "-Djava. awt. headless = true"
Export CATALINA_OPTS
Ii. Solutions to Chinese problems
To enable the Java Runtime Environment to adjust the Chinese font of the system, take Redhat AS3 as an example:
1. Enter the JRE Font setting directory.
Cd jdk directory/jre/lib
2. Back up the original font. properties
Mv font. properties font. properties. original
3. Select a proper Chinese font configuration file for JRE
How to select a proper font system: view the ttf file provided by the system under the font directory, and find the corresponding font. properties that references the file. In this example, the font. properties. zh_CN.Redhat file is/usr/share/fonts/zh_CN/TrueType/zysong. ttf.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service