<html><head><link rel="canonical" href="https://www.jetbrains.com/help/idea/gradle-jvm-selection.html.md/" data-react-helmet="true"/></head><body># Gradle JVM selection

If you created or opened a Gradle project and the version of Gradle JVM in your project is not what you've expected, you can check the following procedures to see how IntelliJ&nbsp;IDEA chooses the specific Gradle JVM version.

Let us say you are [creating](gradle.html#gradle_create_project) a project.

Procedure: Resolve the Gradle JVM version for a new project

1. If you use a [project SDK](sdk.html) which is JDK, then Gradle JVM will be equal to your project's SDK. Basically, Gradle JVM equals Project SDK.

2. If the project's SDK equals JRE, then IntelliJ&nbsp;IDEA will use the same steps as in [opening](#jdk_existing_project) an existing Gradle project.

3. If there is a Gradle wrapper, then IntelliJ&nbsp;IDEA will use the most compatible existing Gradle version on the machine. If you do not use the Gradle wrapper in your project, then Tooling API and the Gradle wrapper that Tooling API will generate is used.

When you [open](gradle.html#gradle_import_project_start) a Gradle project for the first time, IntelliJ&nbsp;IDEA checks several places one by one to establish what version of Gradle JVM to use.

Procedure: Resolve the Gradle JVM version for the existing      project

1. IntelliJ&nbsp;IDEA checks the `gradle.properties` file for the appropriate Gradle JVM specified in `org.gradle.java.home` and uses it for the project.

2. Then it checks the `JAVA_HOME` environment variable.

3. Then it checks the closest appropriate JDK version for the existing Gradle version.

When you add a module to your project, IntelliJ&nbsp;IDEA will do the following:

Procedure: Resolve the Gradle JVM version for a module

1. IntelliJ&nbsp;IDEA will use the Gradle JVM version if there is one in other modules.

2. If there is no Gradle JVM then IntelliJ&nbsp;IDEA will follow the same steps as in [Resolve the Gradle JVM version for the existing      project](#jdk_existing_project).

When you import a module, IntelliJ&nbsp;IDEA uses Gradle defined in the project. If it is not, then IntelliJ&nbsp;IDEA executes the same steps as in [opening](#jdk_existing_project) a project.

Procedure: Access the Gradle JVM settings

&gt; **Note:**
&gt; These settings are available if the project is recognized as Gradle by IntelliJ&nbsp;IDEA.

1. In the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))) , select `Build, Execution, Deployment | Build Tools | Gradle`.

2. On the Gradle settings page, under the Gradle Projects section, use the [Gradle JVM criteria](gradle-settings.html#gradle_jvm) field to check the Gradle version used for importing a project.

</body></html>