Java font configuration is missing

This forum is for discussion about general software issues.

Java font configuration is missing

Postby jezor » Mon Feb 19, 2018 8:47 am

I'm having trouble with Java on my Raspberry Pi 3

I have installed both fontconfig and jre8-openjdk packages:

$this->bbcode_second_pass_code('', '[root@raspberry-pawel jezor]# pacman -Q | grep fontconfig
fontconfig 2.12.6+5+g665584a-1')

$this->bbcode_second_pass_code('', '[root@raspberry-pawel jezor]# pacman -Q | grep jre
jre8-openjdk 8.u111-1
jre8-openjdk-headless 8.u111-1')

And whenever I run a simple Java swing app that should render text, I'm getting the following error:

$this->bbcode_second_pass_code('', 'Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774)
at sun.font.SunFontManager$2.run(SunFontManager.java:431)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.SunFontManager.<init>(SunFontManager.java:376)
at sun.awt.FcFontManager.<init>(FcFontManager.java:35)')

After some debugging, I noticed that the FontManager class is looking for a file called /usr/lib/jvm/java-8-openjdk/jre/lib/fontconfig.properties, which does not exist. When copied it from my laptop to Pi, the error changed but I don't think it's a good approach to fix each and every missing file manually (especially since it should be automatically generated).

I tried installing packages in different orders, java -> fontconfig and fontconfig -> java, didn't help.

How can I generate / where can I get the missing files?
jezor
 
Posts: 1
Joined: Mon Feb 19, 2018 8:38 am

Return to General

Who is online

Users browsing this forum: Google [Bot] and 4 guests