Windows
JDK is bundled with all the product installers and it's recommended that you will use the provided JDK version unless there are any specific issues.
32-bit JDK is located in IDE_HOME\jre directory and is used by the 32-bit product executable.
To run the IDE in 64-bit mode you will need to download and install 64-bit JDK (not JRE) distribution and install it yourself. IDE will find and use it from the registry when you run the 64-bit .exe file (available only for IntelliJ IDEA right now, other products can use the .bat file to run in 64-bit mode).
<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 variable
- JAVA_HOME environment variable
idea64.exe uses this JDK search sequence:
- IDEA_JDK_64 environment variable
- ..\jre64 directory
- system Registry
- JDK_HOME environment variable
- 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:
- IDEA_JDK / WEBIDE_JDK / PYCHARM_JDK / RUBYMINE_JDK environment variable (depends on the product)
- ..\jre directory
- JDK_HOME environment variable
- JAVA_HOME environment variable
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.
Linux
- Refer to the distribution specific instructions for changing the default JDK version (Ubuntu Java documentation).
- It's recommended that you will use the latest version of Oracle JDK or OpenJDK available for your system (OpenJDK 1.6 is not supported, please use 1.7 or later versions).
- Check bin/<product>.sh file for the JDK search order, it's similar to Windows in terms of the environment variable names.
- You can define JDK home environment variable directly in the .sh file to override system defaults.
- Check this answer if you need to install the JDK manually on Linux.
- If you have problems with ugly fonts, check this thread comments for the tips.
- Help | About will show the actual JDK version.
Mac OS X
- Our latest IDE versions come with the bundled custom JDK 1.8 which contains the fixes for most known OpenJDK bugs. Should you need to use a different Java version, please refer to this blog post.
Comments
I couldn't get Android Studio pick up JDK 1.8 either using just the
idea.propertiesfiles.I ended up using the
STUDIO_JDK: http://stackoverflow.com/a/32952022/3055345 .Maybe there's an equivalent for vanilla Idea.
I downloaded IntelliJ 15 for OSX. It downloaded IdeaIU-15.0.1-custom-jdk-bundled.dmg by default. Upon startup all of my projects failed to load saying the maven projects failed to load. In the log I am seeing MavenServerManager failing to reconnect. I tried to run IntelliJ 14 with Java 8 in the past and found that I had to set java.net.preferIPv4Stack=false to get it to work. IntelliJ 15 comes with the value preset to true.
I was able to download IdeaIU-15.0.1.dmg and it runs without that problem but it gives me a warning that updates cannot be automatically downloaded because it is running on Java 6.
See https://intellij-support.jetbrains.com/entries/23395793 to chnage the value of this property. Disable secure updates to make it work on 1.6: http://i.imgur.com/p037pW2.png .
I am not sure how the linked article helps me. I don't see any reference to Maven or running IntelliJ 15 on OSX with Java 8 - which I guess is the default download now - and the fact that the default options for it don't work.
Please submit a support ticket with more details and idea.log.