https://community.openhab.org/t/how-to-point-oh2-to-a-different-java-version/18665
Its a short read, hopefully it’s helpful.