Specify JRE for IntelliJ Idea on Windows
In the following post it was specified that the paths look up sequence is the following:
- IDEA_JDK env. variable
- ./jre directory
- registry
- 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:
IDEA_JDK
/WEBIDE_JDK
/PYCHARM_JDK
/RUBYMINE_JDK
environment variable (depends on the product,WEBIDE_JDK
applies to both WebStorm and PhpStorm)..\jre
directory- system
Registry
JDK_HOME
environment variableJAVA_HOME
environment variable
idea64.exe
uses this JDK search sequence:
IDEA_JDK_64
environment variable..\jre64
directory- system
Registry
JDK_HOME
environment variableJAVA_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:
IDEA_JDK
/WEBIDE_JDK
/PYCHARM_JDK
/RUBYMINE_JDK
environment variable (depends on the product)..\jre
directoryJDK_HOME
environment variableJAVA_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 fromIDE_HOME\jre
. - Use Rapid Environment Editor to add/edit the variables, it will detect incorrect paths.