I have a linux machine with a black box, it comes with only one font /usr/lib/fonts/ipag.ttf, but it does not seem to be installed correctly, and the custom installation is openjdk 9
Installing openjdk happens without any fonts, but I tried to create a font directory and copy this font into it, but it didn’t affect it.
When I run my non gui application, it requires fonts to create an Excel spreadsheet with jakarta-poi, but it crashes:
Caused by: java.lang.NullPointerException
at java.desktop/sun.awt.FontConfiguration.getVersion(Unknown Source)
at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(Unknown Source)
at java.desktop/sun.awt.FontConfiguration.init(Unknown Source)
at java.desktop/sun.awt.X11FontManager.createFontConfiguration(Unknown Source)
at java.desktop/sun.font.SunFontManager$2.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/sun.font.SunFontManager.<init>(Unknown Source)
at java.desktop/sun.awt.FcFontManager.<init>(Unknown Source)
at java.desktop/sun.awt.X11FontManager.<init>(Unknown Source)
Then I tried to run
fc-cache -rv /usr/lib/fonts
It was reported that the font was installed (although fc-list returns nothing)
Now my application gets a little more, but still does not work, reports
Caused by: java.lang.NullPointerException
at java.desktop/sun.awt.FcFontManager.getDefaultPlatformFont(Unknown Source)
at java.desktop/sun.font.SunFontManager$2.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/sun.font.SunFontManager.<init>(Unknown Source)
at java.desktop/sun.awt.FcFontManager.<init>(Unknown Source)
at java.desktop/sun.awt.X11FontManager.<init>(Unknown Source)
, , , Java. , fonts.properties, Oracle jres, OpenJdk
OpenJdk1.8, , , , openjdk 9.
, , .
Lucida, Oracle jre, jre/libs/font fc-cache -rv , , ipag.ttf ?
fc-cache cant java, , .