We have OpenJDK as well which is the reference implementation for the
Java language specifications. The different JDK flavours should follow the Java language specification in terms of supporting the language and the byte code format. So if your target platform has all the required libraries which are being used by your application then the compiled java code should run across the JVM platforms (for the same JDK version).
You might have seen that we can use OpenJDK and compile the code and run it on OracleJDK (though there are subtle differences between the two).
This is a most unlikely practical scenario where you develop and build against one JDK platform and deploy on another JDK platform.
You should keep your development,
test and production platforms similar so that you don't end up with surprises when your code goes into production.