Snapping Java Swing applications
Reinhard Pointner
reinhard.pointner at gmail.com
Tue May 17 19:10:58 UTC 2016
Hi snapcrafters!
I've been trying to snap a Java Swing GUI application, but I'm stuck at
some missing dependencies (or missing snappy interfaces?) that make it
crash on startup.
This is the console output that I get:
(process:18465): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Gtk-Message: Failed to load module "overlay-scrollbar"
Gtk-Message: Failed to load module "canberra-gtk-module"
java.lang.NullPointerException
at com.sun.java.swing.plaf.gtk.PangoFonts.lookupFont(PangoFonts.java:204)
at
com.sun.java.swing.plaf.gtk.GTKLookAndFeel.getGTKStyleFactory(GTKLookAndFeel.java:1603)
at
com.sun.java.swing.plaf.gtk.GTKLookAndFeel.loadStyles(GTKLookAndFeel.java:1567)
at
com.sun.java.swing.plaf.gtk.GTKLookAndFeel.initialize(GTKLookAndFeel.java:1452)
at net.filebot.Main.startUserInterface(Main.java:181)
at net.filebot.Main.lambda$main$0(Main.java:123)
May 18, 2016 2:14:33 AM java.util.prefs.FileSystemPreferences$1 run
WARNING: Couldn't create user preferences directory. User preferences are
unusable.
May 18, 2016 2:14:33 AM java.util.prefs.FileSystemPreferences$1 run
WARNING: java.io.IOException: No such file or directory
The GTK warnings can probably be ignored, but somehow the Java Swing GTK
Look-and-Feel is looking for some system fonts that it can't find, and then
crashes because of that. Any ideas how to add the missing GTK
fonts/resources to my snap?
Also, there's something fishy going on in the generated command-*.wrapper
... $SNAP$SNAP$SNAP$SNAP$SNAP doesn't look right to me:
export
LD_LIBRARY_PATH="$SNAP$SNAP$SNAP$SNAP$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64:$SNAP$SNAP$SNAP$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64:$SNAP$SNAP$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64:$SNAP$SNAP/usr/lib/jvm/java-8-openjdk-amd64/bin/../lib/amd64/jli:$SNAP$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/../lib/amd64/jli:$SNAP$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64:$SNAP$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/jli:$SNAP/usr/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu/pulseaudio:$LD_LIBRARY_PATH"
Here's my snapcraft.yaml:
https://github.com/filebot/filebot/tree/master/installer/snappy
Cheers,
Reinhard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-app-devel/attachments/20160518/81ecc4c8/attachment.html>
More information about the snappy-app-devel
mailing list