Search code examples
intellij-idea

What is the "Use compiler from module target JDK when possible" option?


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".

enter image description here

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?


Solution

  • From IntelliJ IDEA documentation:

    when possible

    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).