See Old java version in bionic for background.
The way you install (recent) JDKs from in install-jdk.sh by downloading from java.dev with fixed versions seems not so great, to me.
Why not just “apt-get install -y openjdk-11-jdk-headless” to get the package from Ubuntu?
This would make it much easier to get the latest, e.g. 11.0.7 instead of your fixed year old 11.0.2.
We hacked this in https://github.com/apache/fineract/pull/846/files, but it seems weird to have to do that.