1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 黑体 is not available to the JVM. See

net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 黑体 is not available to the JVM. See

时间:2018-09-11 01:37:05

相关推荐

net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 黑体 is not available to the JVM. See

彻底解决linux上:

建个类 运行在linux上:

class fonts{

public static void main(String[] args) throws Exception {

System.out.println(Arrays.asList(GraphicsEnvironment

.getLocalGraphicsEnvironment().getAvailableFontFamilyNames()));

}

}

查看一下是否真缺某个字体。缺了再按如下走

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

1.确保你的操作系统为中文.

vi /etc/sysconfig/i18n

2.确保tomcat或者服务器容器运行为中文。

exprot

3.打开cd /usr/share/fonts/dejavu/

考上缺的字体到武器。比如simhei就是黑体 。从windows下的fonts文件家里

4.执行fc-cache -fv

方式2.

上一方式1,2都要看。

解压缩jasperreports-fonts-4.1.3.jar

jar -xvf jasperreports-fonts-4.1.3.jarjasperreports-fonts-4.1.3

考simhei文件到dejavu文件夹下:

修改fonts文件

重新打包

jar -cvf jasperreports-fonts-4.1.3.jarjasperreports-fonts-4.1.3

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。