Specify JRE for IntelliJ Idea on Windows Specify JRE for IntelliJ Idea on Windows windows windows

Specify JRE for IntelliJ Idea on Windows


In the following post it was specified that the paths look up sequence is the following:

  1. IDEA_JDK env. variable
  2. ./jre directory
  3. registry
  4. JDK_HOME environment variable

And indeed. Creating an IDEA_JDK environment variable did help.


More actual information including JDK64 setup is here:

<product>.exe uses this JDK search sequence:

  1. IDEA_JDK / WEBIDE_JDK / PYCHARM_JDK / RUBYMINE_JDK environment variable (depends on the product, WEBIDE_JDK applies to both WebStorm and PhpStorm)
  2. ..\jre directory
  3. system Registry
  4. JDK_HOME environment variable
  5. JAVA_HOME environment variable

idea64.exe uses this JDK search sequence:

  1. IDEA_JDK_64 environment variable
  2. ..\jre64 directory
  3. system Registry
  4. JDK_HOME environment variable
  5. JAVA_HOME environment variable

It’s also possible to start the IDE with <product>.bat file located in the bin directory, it uses the following JDK search sequence:

  1. IDEA_JDK / WEBIDE_JDK / PYCHARM_JDK / RUBYMINE_JDK environment variable (depends on the product)
  2. ..\jre directory
  3. JDK_HOME environment variable
  4. JAVA_HOME environment variable

Environment variable must point to the JDK installation home directory, for example:

c:\Program Files (x86)\Java\jdk1.7.0_17
  • /create-i4j-log command line switch can be used with the .exe to trace the JDK search sequence and find out why the specific JDK was chosen.
  • The actual JDK version used by the IDE can be verified in Help | About dialog (open any project to access the menu).
  • Define IDEA_JDK / WEBIDE_JDK / PYCHARM_JDK / RUBYMINE_JDK variable depending on the product to override the default version from IDE_HOME\jre.
  • Use Rapid Environment Editor to add/edit the variables, it will detect incorrect paths.