2
問題發生時,我嘗試創建SXSSFWorkbook
。使用stij字體與openjdk的異常?
異常堆棧跟蹤:
java.lang.ArrayIndexOutOfBoundsException: 0
at sun.font.CompositeFont.getSlotFont(CompositeFont.java:351)
at sun.font.CompositeGlyphMapper.initMapper(CompositeGlyphMapper.java:81)
at sun.font.CompositeGlyphMapper.<init>(CompositeGlyphMapper.java:62)
at sun.font.CompositeFont.getMapper(CompositeFont.java:409)
at sun.font.CompositeFont.canDisplay(CompositeFont.java:435)
at java.awt.Font.canDisplayUpTo(Font.java:2063)
at java.awt.font.TextLayout.singleFont(TextLayout.java:470)
at java.awt.font.TextLayout.<init>(TextLayout.java:531)
at FontTest.main(FontTest.java:15)
gradle這個文件:
compile 'org.apache.poi:poi:3.14'
compile 'org.apache.poi:poi-ooxml:3.14'
環境:
- OpenJDK的版本 「1.8.0_141」
- 的RedHat 7.4
- wildfly 10.0.0
相同的解決方案也適用於'CentOS Linux release 7.4.1708(Core)'。 只要確保'sudo chmod 644/etc/fonts/local.conf' –