Subject: Re: bug#24327: java does not support swing

From: [email-masked] (宋文武)
Date: Sun, 11 Sep 2016 10:14:45 +0800

Alex Vong <[email-masked]> writes:

> Hi,
>
> Our current java does not support swing. To reproduce, first install
> java and clojure. Then start the clojure repl by running:
>   $ ~/.guix-profile/bin/java -cp ~/.guix-profile/share/java/clojure-1.8.0.jar clojure.main
>
> Then try the repl by typing:
>   => (+ 1 2 3)
>   6
>
> Now run:
>   => (javax.swing.JOptionPane/showMessageDialog nil "Hello World")
>   NullPointerException   sun.awt.FontConfiguration.getVersion (FontConfiguration.java:1264)
>
> Note that the above test case is taken from
> <https://clojure.org/guides/getting_started>.
>
> In contrast, if we replace ~/.guix-profile/bin/java by /usr/bin/java in
> the command, we do not get a nullpointerexception (my base distro is
> debian testing). So there should be a problem in our java build. Any
> ideas? 

Yeah, openjdk-8 loads fontconfig via dlopen.

Fixed in commit cab1760de.