...so configure.ac would mis-determine JAVA_HOME as /app, would add
-I/app/include -I/app/include/linux to SOLARINC, and #include <jni.h> would not
be found.
At libreoffice flatpak build time, the java-11-openjdk rpm will populate
/etc/alternatives (even though that is outside /app) with symlinks to
/app/lib/jvm, so that the symlink chain /app/lib/jvm/java ->
/etc/alternatives/java_sdk/ ->
/app/lib/jvm/java-11-openjdk-11.0.9.11-9.module+f33+3+4101bf32.x86_64/ (or
whatever the latter's exact name) will work. (At flatpak composition time,
those non-/app files will be dropped from the resulting flatpak, so that
container.yaml needs to set up the /app/lib/jvm/jre-flatpak symlink for
--env=JAVA_HOME=/app/lib/jvm/jre-flatpak to find the Java installation under a
stable name, as then the /app/lib/jvm/jre -> /etc/alternatives/jre/ symlink will
be dangling.)