美文网首页
NPE at java.desktop/sun.awt.Font

NPE at java.desktop/sun.awt.Font

作者: turboDong | 来源:发表于2020-08-26 19:53 被阅读0次
Caused by: java.lang.NullPointerException
        at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1262)
        at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:225)
        at java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:107)
        at java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:719)
        at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:367)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.desktop/sun.font.SunFontManager.<init>(SunFontManager.java:312)
        at java.desktop/sun.awt.FcFontManager.<init>(FcFontManager.java:35)
        at java.desktop/sun.awt.X11FontManager.<init>(X11FontManager.java:56)
        ... 88 more

CentOS使用的时候报这个错,因为缺少字体

yum install -y fontconfig
yum install -y urw-fonts

安装字体后,重启tomcat就可以了

相关文章

网友评论

      本文标题:NPE at java.desktop/sun.awt.Font

      本文链接:https://www.haomeiwen.com/subject/qwvfsktx.html