I installed new Intellij of community edition. While running my project which was compiled using default version java(Azul Zulu) comes with Intellij, it was not able to pick environment variables set for java project.
Also, with Oracle OpenJDK it did not worked.
This has nothing to do with the JDK.
Open the Gradle settings:
Change
Build and run using
andRun and test using
toIntellij Idea
.