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,
straced the existing
java and verified that it cannot find
The funny thing is that the standard JREs in Ubuntu work perfectly… so maybe I’m missing something?
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
- Use the layout feature to expose
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.