I've been trying to run PCGen
(https://github.com/PCGen/pcgen/releases) on my laptop running Guix
System, so far without success. I know that ideally all software would
be installed through Guix itself, but this thing is a Java app with
several dependencies that aren't in Guix yet and... honestly, right at
this moment, I'd be fine with running the jar directly for now.
However, when attempting to run this Jar with openjdk installed, I get
a null pointer exception related to some font configuration code. This
seems related to an issue on the AdoptOpenJDK repos[0], which was
solved in that case by installing the fontconfig package (on a Debian
install in their case). However, installing fontconfig into my profile
in Guix hasn't done the trick. There's a workaround mentioned
involving creating a fontconfig.properties file in JAVA_HOME, but
setting that as an environment variable didn't seem to do the trick
either.
While the specific application I'm focusing on is PCGen, this seems to
affect graphical Java applications in general; I tested with a
generic JAR build of Jitsi and ran into the same issue.
Can anyone familiar with Java provide some assistance in tracking down
this problem?
https://github.com/AdoptOpenJDK/openjdk-build/issues/693
jfred@lambdacrypt ~/Downloads/pcgen$ java -jar pcgen.jar
11:46:40.374 INFO main Main:138 Starting PCGen v6.08.00 RC6
11:46:40.448 INFO main LanguageBundle:134 Initialising language bundle with locale en_US.
11:46:40.581 SEVERE main LookAndFeelManager:222 Look and Feel Java cannot be found
11:46:40.756 SEVERE main Main:484 Uncaught error - ignoring
java.lang.InternalError: java.lang.reflect.InvocationTargetException
at java.desktop/sun.font.FontManagerFactory$1.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.desktop/sun.font.FontManagerFactory.getInstance(Unknown Source)
at java.desktop/java.awt.Font.getFont2D(Unknown Source)
at java.desktop/java.awt.Font.getFamily(Unknown Source)
at java.desktop/java.awt.Font.getFamily_NoClientCode(Unknown Source)
at java.desktop/java.awt.Font.getFamily(Unknown Source)
at java.desktop/sun.swing.SwingUtilities2.displayPropertiesToCSS(Unknown Source)
at java.desktop/javax.swing.plaf.basic.BasicHTML$BasicDocument.setFontAndColor(Unknown Source)
at java.desktop/javax.swing.plaf.basic.BasicHTML$BasicDocument.(Unknown Source)
at java.desktop/javax.swing.plaf.basic.BasicHTML$BasicEditorKit.createDefaultDocument(Unknown Source)
at java.desktop/javax.swing.plaf.basic.BasicHTML.createHTMLView(Unknown Source)
at java.desktop/javax.swing.plaf.basic.BasicHTML.updateRenderer(Unknown Source)
at java.desktop/javax.swing.plaf.basic.BasicButtonUI.installUI(Unknown Source)
at java.desktop/javax.swing.JComponent.setUI(Unknown Source)
at java.desktop/javax.swing.AbstractButton.setUI(Unknown Source)
at java.desktop/javax.swing.JRadioButton.updateUI(Unknown Source)
at java.desktop/javax.swing.AbstractButton.init(Unknown Source)
at java.desktop/javax.swing.JToggleButton.(Unknown Source)
at java.desktop/javax.swing.JRadioButton.(Unknown Source)
at java.desktop/javax.swing.JRadioButton.(Unknown Source)
at pcgen.gui2.dialog.OptionsPathDialog.addRadioButton(OptionsPathDialog.java:162)
at pcgen.gui2.dialog.OptionsPathDialog.initComponents(OptionsPathDialog.java:104)
at pcgen.gui2.dialog.OptionsPathDialog.(OptionsPathDialog.java:61)
at pcgen.gui2.dialog.OptionsPathDialog.promptSettingsPath(OptionsPathDialog.java:68)
at pcgen.system.Main.loadProperties(Main.java:328)
at pcgen.system.Main.startupWithGUI(Main.java:230)
at pcgen.system.Main.main(Main.java:157)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
... 28 more
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(Unknown Source)
at java.desktop/sun.font.SunFontManager.(Unknown Source)
at java.desktop/sun.awt.FcFontManager.(Unknown Source)
at java.desktop/sun.awt.X11FontManager.(Unknown Source)
... 33 more