OH4 upgrade issue

You can also use the $JAVA_HOME environment variable for that which is set when the container is started:

Then your changes will keep working with any Java version on any architecture and also when another JVM is used.

The JVM in the container was changed to fix issues on some platforms.

See: Docker container does not start on Raspberry lite 64: openhab/runtime/lib/endorsed is not supported