`
happyqing
  • 浏览: 3154793 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

JasperReport在linux部署错误,找不到宋体

阅读更多

 

JasperReport 错误:net.sf.jasperreports.engine.util.JRFontNotFoundException: Font '宋体' is not available to the JVM.

 

解决方法:

1、把需要用到的字体(可以直接拷贝windows系统的C:\WINDOWS\Fonts 下的相关字体)
拷贝当前项目的classpath下,一般为classes目录下(可以建个Font目录)
2、在classpath里添加 jasperreports.properties 属性文件
文件内容为:
net.sf.jasperreports.awt.ignore.missing.font=true

即可解决

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics