With platform 2.4 you can use java 14 as per the release notes on this link OpenMRS Platform 2.4.0 Released