Hi,I'd like to update some findings.

My compouter runs CentOS 6.4 x64, and I install openjdk 1.8 x86_64, then I find 
the problem went away. :) 
The former openJRE is from another computer which runs CentOS 6.6 x86, and I 
installed openjdk 1.8 and copied the jre folder to my project as part of 
installation. 


I hope this jre folder can runs everywhere, and I don't know if it loses some 
libraries. Actually I copied following 3 libraries to jre i386 directory in 
order make it runs.


1. libfreetype.so
2. libfontconfig.so
3. libexpat.so


Indeed it runs well most time except this jfreechart issue. I guess it still 
miss some libraries. But I'm not sure. Who can help with it ?
As to why I copy existing jre foler rather than install a new openjre because 
Oracle JRE is a tar file and I like it. I used to embed all necessary parts 
into project and so I won't ask customer to install this or that dependency 
part.



------------------ Original ------------------
From:  "AAAA";<31731...@qq.com>;
Date:  Sat, May 7, 2016 12:19 PM
To:  "awt-dev"<awt-dev@openjdk.java.net>; 

Subject:  <AWT Dev> An issue of OpenJRE



If this mail distrub you please ignore that, sorry for inconveniences. I really 
hope to get your help.


Recently I'm porting a project form oracle jdk to open jdk, and compile process 
is smooth and most parts runs well, but jfreechart cannot work. I have 
submitted a question to jfreechart forum 
(http://www.jfree.org/forum/viewtopic.php?f=3&t=117569&p=179724#p179724).


However after sometime troubleshooting, I find the problem is related with open 
jre. That means jfreechart works fine in oracle jre but fails in open jre.
Again I find more details, when I run following codes I will get wrong result, 
which causes jfreechart not to work.


                BufferedImage image = new BufferedImage(200, 200, 
BufferedImage.TYPE_INT_RGB);
                Graphics2D g2 = image.createGraphics();
                FontMetrics fm = g2.getFontMetrics();



The fm includes strange value, if I switch to oracle jre fm has right value. I 
don't know why. Can somebody help me?

Reply via email to