Hello,
I am creating a snap for EduMIPS64 (www.edumips.org), a MIPS64 CPU simulator written in Java.
I got everything working, except the splash screen, which doesn’t show.
I pin-pointed the problem down to missing libsplashscreen.so
in the JREs used by Snap (both JDK 8 and JDK 11): I went to mounted snap, strace
d the existing java
and verified that it cannot find libsplashscreen.so
.
The funny thing is that the standard JREs in Ubuntu work perfectly… so maybe I’m missing something?
Thanks,
Andrea
With JDK 11 this library is at /usr/lib/jvm/java-11-openjdk-amd64/lib/libsplashscreen.so
. You could try either of two options:
- Add the path
$SNAP/usr/lib/jvm/java-11-openjdk-amd64/lib
to LD_LIBRARY_PATH
- Use the layout feature to expose
$SNAP/usr/lib/jvm/java-11-openjdk-amd64
to /usr/lib/jvm/java-11-openjdk-amd64
:layout:
/usr/lib/jvm/java-11-openjdk-amd64:
bind: $SNAP/usr/lib/jvm/java-11-openjdk-amd64
Many thanks for the suggestion, Daniel!
The problem seems to be that by default the gradle
plugin uses the headless
JDK (and by extension JRE).
I solved it by adding openjdk-11-jdk
to the stage dependencies: https://github.com/snapcore/snapcraft/blob/master/snapcraft/plugins/v1/gradle.py#L170
I’ll open a bug and send a patch to use the standard, non-headless, JRE as a runtime dependency.