ITeye博客

ireport部署到linux系统字体问题

jguangyou · 2012-04-23 13:40 · 其他 · Web前端 · Markdown

net.sf.jasperreports.engine.util.JRFontNotFoundException: Font '宋体' is not available to the JVM. See the Javadoc for more details.

解决方法:

1、把需要用到的字体(可以直接拷贝windows系统的C:\WINDOWS\Fonts 下的相关字体)拷贝当前项目的classpath下,一般为classes目录下

2、在classpath里添加 jasperreports.properties 属性文件

文件内容为:

net.sf.jasperreports.awt.ignore.missing.font=true

即可解决

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。