The sdk-extensions are only available from the SDK & not accessible from the Platform. In this case, flatpak-builder distinguishes between runtime & sdk, you don’t have to do anything.
I’m not completely sure with the Java packaging, but I believe you should be able to drop your openjdk module, too. It’s only required if you want to copy the JRE (for the JDK you’d execute installjdk.sh) into your /app
-prefix.
But since you’re directly using the org.freedesktop.Sdk.Extension.openjdk17-extension (via JAVA_HOME
etc.), jlink
& jpackage
should already create your stripped down JRE from /usr/lib/sdk/openjdk17/jvm/openjdk-17
& just ignore /app/jre
(the install.sh
destination).