'how can i use different jdk for run and compile on IntelliJ?

I want to use zuluJDK for compile and AdoptJDK for run because of some reason.

but I can not find a way.

I've seen how to set compiler on Intellij web site. but there is no way to use different jdk for compile.

Even if i do not use IntelliJ, please let me know if there is a way to use other jdk in compiling and running



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source