In IntelliJ if you go to Preferences -> Build, Execution, Deployment -> Compiler -> Java Compiler, there's an option called "Use compiler from module target JDK when possible".
I wonder what is meant by "when possible". When would it not be possible? And in the case when it's not possible, what will be used?
From IntelliJ IDEA documentation:
When it's not possible to use the module JDK, build process JDK will be used which is the same JDK as used to run IntelliJ IDEA (currently JetBrains Runtime bundled with the IDE is based on JDK 11).