Jfreechart deploys a linux server to generate the image garbled solution. Recently, jfreechart is used in the system to create a chart function. Local testing (windwoxp environment) is normal,
However, when I put it on a linux server, I found that the image of the generated chart was garbled. So I checked the problem online and solved the problem. The following are the steps to solve the problem in combination with the solution of my online friends: www.2cto.com this is because JDK/JRE in linux lacks Chinese fonts (supported. 1. find a Chinese font that can be used in linux. I am looking for c: \ windows \ fonts \ simsun in windows. ttc (I have downloaded below) 2. put the above font file in the jre/lib/fonts directory where jdk is installed on your linux server. 3. /usr/j2sdk1. XXX/jre/lib/fonts. dir 3.1 adds a number in the first line (if it is 72, it is changed to 73) 3.2 adds the Java code simsun in the last line www.2cto.com. ttc-SungtiL GB-medium-r-normal -- 0-0-0-0-c-0-gb2312.1988-0 restart the project! OK simsun.zip (5.5 MB)
Http://dl.iteye.com/topics/download/d6b3e338-0d57-3f02-bacf-eff2e6e64414