Search code examples
intellij-ideajvm

How do I change the JVM used to run IntelliJ on Windows


I have two Java JDKs installed on my workstation, with jdk1.6.0_41 in my path, and jdk1.7.0_21 available as well, but not in the path.

How can I configure IntelliJ IDEA 13 to use a particular JVM? To be clear, I want to set the JVM used to run IntelliJ itself, not the SDK used for running my code. I am running Windows 7 Enterprise Edition and launch IntelliJ 13.0.2 by running idea64.exe

I have set JAVA_HOME to point to jdk1.7.0_21 but according to the About box it is using jdk1.6.0_41.

This FAQ on the JetBrains web site describes how to do this for Mac, but not for Windows.

This answer suggests using the IDEA_JVM environment variable for Ubuntu 12, but I have tried that and it isn't working.


Solution

  • With newer versions the environment variables are ignored. Instead there is a new action "Choose Boot Java Runtime". The easiest way to get to it is via "Find Action" Ctrl+Shift+A.

    You can also edit the setting via the .jdk file in your user configuration directory, e.g. %APPDATA%\JetBrains\IntelliJIdea2021.3\idea64.exe.jdk. This is a plain text file containing only the path to the JDK.

    It is not recommended to do this, and you should use the JDK that is bundled with IDEA.