Selecting the JDK version the IDE will run under

All the products on all the supported platforms already have 64-bit JetBrains Runtime 21 bundled and it will be used by default to run the IDE. If you need to change the runtime to a different version, see below. Please note that all the current IDE versions require at least Java 17 version to run. Our IDEs will not run on the older Java versions like Java 8 or 11.

All platforms: download and install JetBrains Runtime via Choose Boot Java Runtime for the IDE action

  1. Start the IDE, use Help | Find Action (Ctrl+Shift+A or Cmd+Shift+A on Mac), type "Choose Boot Java Runtime for the IDE", press Enter.
  2. Select the version to install, the higher the number after b, the more recent is the version. It makes sense to install the most recent version or the version you were asked to try by JetBrains staff. Installing old runtime versions may render your IDE unusable or introduce new issues.
  3. Click the OK button and wait until the file with JetBrains Runtime is downloaded and configured.
  4. Restart the IDE to try the new runtime.
  5. Verify via About dialog that the new runtime is used. Notice the vendor (should be JetBrains s.r.o) and the release number (should correspond to the number after b in the file you've downloaded).
  6. If the JDK version in the About dialog doesn't match or didn't change, see below. Most likely, you have an environment variable configured which has the priority over the <product>.jdk file. Remove any environment variables affecting IDE runtime selection and restart.

All platforms: Add Custom Runtime

  1. Follow the steps from the section above to open the Choose Boot Java Runtime for the IDE dialog.
  2. Use the Add Custom Runtime option
  3. Select one of the already installed JDK 21 options or click Add JDK
  4. To add a new JDK specify the home folder of the Java 21 installation on your disk

This option is useful to check if the issue you might have is specific to JetBrains Runtime or is common to this Java version from all the vendors. It helps to isolate and fix issues with JetBrains Runtime or workaround problems as you can continue working until the issue is resolved.

All platforms: Switch back to the default bundled JetBrains Runtime

  1. Open the Choose Boot Java Runtime for the IDE dialog as described above
  2. Click the Use Default Runtime button
  3. Restart the IDE

If you can't start the IDE to access this dialog or the runtime doesn't change, please see below for the platform specific instructions. You would need to remove the <product>.jdk file from the configuration directory and unset any environment variables that override the default runtime. If there is no jbr subdirectory in the IDE installation directory, reinstall the product.

 

Windows

JDK (JetBrains Runtime) 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. Since 2017.1 version 64-bit JDK is bundled by default on all the systems.

<product>64.exe uses this JDK search sequence:

  1. IDEA_JDK / PHPSTORM_JDK / WEBIDE_JDK / PYCHARM_JDK / RUBYMINE_JDK / CL_JDK / DATAGRIP_JDK / GOLAND_JDK environment variable
  2. idea.config.path\<product>64.exe.jdk file
  3. ..\jbr directory
  4. system Registry
  5. JDK_HOME environment variable
  6. 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 / PHPSTORM_JDK / WEBIDE_JDK / PYCHARM_JDK / RUBYMINE_JDK / CL_JDK / DATAGRIP_JDK / GOLAND_JDK environment variable (depends on the product)
  2. idea.config.path\<product>64.exe.jdk file
  3. idea.config.path\<product>.exe.jdk file
  4. ..\jbr directory
  5. JDK_HOME environment variable
  6. JAVA_HOME environment variable
Environment variable must point to the JDK installation HOME directory, for example:
c:\Program Files\Java\jdk17.0.10
  • 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 / PHPSTORM_JDK / WEBIDE_JDK / PYCHARM_JDK / RUBYMINE_JDK / CL_JDK / DATAGRIP_JDK / GOLAND_JDK variable depending on the product to override the default version from IDE_HOME\jbr.
  • Use Rapid Environment Editor to add/edit the variables, it will detect incorrect paths.

Linux

  • Starting from IntelliJ IDEA 2016 and the most recent versions of the lightweight IDEs, we are bundling custom JRE (JetBrains Runtime) with Linux distributions, just like we've been doing for Mac. Our custom JRE is based on OpenJDK and includes the most up to date fixes to provide better user experience on Linux (like font rendering improvements and HiDPI support).
  • Boot JDK path is stored in the <product>.jdk file located in the config folder. It can be modified either via the Change IDE boot JDK action or by manually editing .jdk file (if you can't start the IDE to change it via an action).
  • It's recommended to use the bundled JRE (if available). In case you have any issues with the bundled version, you can switch to the latest Oracle JDK or OpenJDK build available on your system (JDK 21 is recommended).
  • Check bin/<product>.sh file for the JDK search order, it's similar to Windows in terms of the environment variable names. It's a legacy way to adjust the boot jdk, use it for older product versions. Consider using <product>.jdk file instead (see above), so that your modifications can survive IDE updates/re-installation.
  • Check this answer if you need to install the JDK manually on Linux.
  • If you have problems with ugly fonts, please see this thread comments for the tips.
  • Help | About will show the actual JDK version.

macOS

  • IDE is using the bundled JetBrains Runtime by default.
  • If you override IDE JDK version (via the Choose Runtime plug-in), its path is stored in <product>.jdk file located in the config folder (idea.jdk for IntelliJ IDEA, pycharm.jdk for PyCharm, etc). Delete this file or change the path inside the file manually in case IDE no longer starts and you can't change it via the menu.
  • If IDE doesn't start and this file doesn't exist, create it manually and specify Java path to use (Java home location), for example:
    /Library/Java/JavaVirtualMachines/jdk-21.jdk
190 out of 496 found this helpful
209 comments

@Tony19

I have changed my JDK version to "1.8*", now that I have Oracle Java 8 installed. I haven't had nag problems after editing the plist, provided I have opened the app at least once before editing.  Admittedly, I've only opened IntelliJ a few times since the change.

0
Avatar
Permanently deleted user

I edited JVMVersion in the Info.plist file for macOSX to 1.8* and on boot it does complain about early access versions and when I hit about idea it showed 1.8.0_20-ea-b22 x86_64 but when I run a maven project it shows that it is using the 1.7 version JDK  which is OK. I checked the JVMs that are available to use in the /Library/Java/JavaVirtualMachines/ directory and both 1.7x and 1.8x are available. When I enter "java -version" in the console it defaults to 1.8x. I've yet to try java8 for anything but I'm hoping on a new project i can easily use java 8 instead of java 7.

0
Avatar
Permanently deleted user

Harirao3: The JDK version that IntelliJ runs under is entirely unrelated to the JDK your project runs under.  To change your project JDK go to View --> Open Module Settings --> Project Settings --> Project --> Project SDK

0
Avatar
Permanently deleted user

Thanks @Henrik, i actually just realized this and have fixed it accordingly! but good to have it written down for reference too

0

I just updated the info.plist on my MacBook Pro to 1.7 (1.7.0_60) and restarted intelliJ. This machine has a retina display, and the GUI became much sharper than when running with Apples 1.6! I know that Oracle did not support retina displays on Mac for 1.7 when it came, but apparently they have fixed that now. It looks really good!

0

Laptop users, please be aware that running under JDK 1.7 or 1.8 will always enable your discrete GPU which will lead to the faster battery drain. It's a known JDK bug. If the battery life is critical for you, consider running under the recommended JDK 1.6 version. You can also try other workarounds, like the third-party gfxCardStatus utility that can forcibly disable the discrete GPU and switch to the integrated one.

0
Avatar
Permanently deleted user

@Serge Baranov: Could you update this document to reflect for Android Studio and CLion?

0
Avatar
Permanently deleted user

@Serge, is there any estimate on when IntelliJ will run on Java 8 for Mac? 6 Months a year?

0

@Adrian, as soon as IntelliJ IDEA runs stable on Java 8, we'll switch to this Java version by default on Mac. There are still major issues to resolve and resolution of several issues depends on Oracle. We can't provide any estimates for Oracle, sorry. We have experimental version with bundled Java 8, see my answer here for the details how to get it.

0

Hello. I'm not shure it is right place for question, but there https://www.jetbrains.com/idea/help/configuring-global-project-and-module-sdks.html#comment-1716362147 was been forwarded...

Is it possible run Idea say in JDK 1.7, but run/debug some for example in 1.8? It will be very desired have such per run/debug configurations settings.

 

0

Pahan, sure. You run/debug the project with the JDK configured for the project. It can be any version, 1.6, 1.7, 1.8. You can also override the JDK per run/debug configuration. IntelliJ IDEA is very flexible, you can run IDE itself under JDK 1.8, build/run/debug with JDK 1.6 and also have specific run/debug configurations that will run/debug with 1.7 and 1.8.

0

I have found "Use alternative JRE" in f.e. for Junit run, but not for Groovy script. My initial question was about groovy so because that it looks so stupid. Sorry.

How I could doing so for run groovy scripts also?

0

You can't do it for Groovy, request is welcome if this feature is required for your project. As this question is offtopic here, please consider contacting support or using YouTrack in case you have any other questions. Thank you.

0

@Serge thank you very much. I've request it https://youtrack.jetbrains.com/issue/IDEA-135061. And sorry for the offtopic here.

0
Avatar
Permanently deleted user

@Serge: so its not possible right now to run idea 14 under java 8 on mac?

0

An Anderl, it's possible, but not recommended with the official 1.8 JDK. You can try 14.1 EAP version with custom JDK which has many bugs fixed.

0
Avatar
Permanently deleted user

Just forget my comment above :) i read it all now

0
Avatar
Permanently deleted user

How do I "open" and existing project on intellij 13.1.6  on MAC? it does not show the ij-icon for .iml/.idea folder. it only shows folder that does not tell me if this is correct folder to load project.

build: 135.1306 ultimate on mac x86_64 on macbook pro JRE/JVM hotspot 64 bit by apple

Also if it is not a correct folder for project ( from the open project menu -- where you know user is trying to open an "existing" IJ project) it creates a bad project with new .idea folder/iml file...

can you help ?

0
Avatar
Permanently deleted user

If you are using 0xDBE the path variable is dbe_JDK

0
Avatar
Permanently deleted user

Hi, 

 My JAVA_HOME is set to a Jrockit version. So, I created JDK_HOME and set it to Java 7. But when I click on idea64.exe, it is still trying to search for JAVA_HOME rather than JDK_HOME. (IDEA build 141.177).

0

Try setting IDEA_JDK_64 instead. We have changed the launcher some time ago, so the order/variables may be a bit different.

0
Avatar
Permanently deleted user

Trying to do this for Webstorm (10.2) 64 bit using the exe vs bat and it still looks @ JAVA_HOME.   I have set WEBIDE_JDK, WEBIDE_JDK_64, IDEA_JDK, IDEA_JDK_64 to all point to a specific version of JDK and it stills uses JAVA_HOME as the jdk.  My scenario, I have two flavors of jdk installed and JAVA_HOME is set to an older version of JDK. 

0
Avatar
Permanently deleted user

Hi there,

is Oracle JDK 1.7 still the recommended version for Linux? Or is it safe to switch to Oracle 1.8, or God forbid, OpenJDK?

Cheers!

0

You can use 1.8 Oracle JDK or OpenJDK on Linux.

0
Avatar
Permanently deleted user

Great, thank you! Maybe the original post could be updated?

0

I recently began experiencing system crippling performance under PHPStorm 8.0.3. I am running Ubuntu 15.04 on a 6-core i7 processor with 16GB RAM. When indexing files all processing was assigned to a single CPU, which shot the CPU to 100%. Clearing cache and invalidating cache had no positive affect. I finally tracked this down to an apparent issue related to Java -- perhaps an update that was recently applied, not entirely sure. I had been running Java under the Oracle JDK --  Java(TM) SE Runtime Environment (build 1.8.0_45-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode). I installed OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu1) OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode) and performance is as expected. Most notably, the load of indexing is distributed evenly across all 12 CPUs.  Thought I would post this in case it helps others.

0
Avatar
Permanently deleted user

I'm running Osgeo Live stack in Ubuntu 14.04 and need to retain OpenJDK 7 for the stack but need Oracle JAVA for PyCharm

Solution: Add Oracle JAVA 8 (but don't remove the existing JAVA if you still need it i.e. my problem)

$ sudo add-apt-repository ppa:webupd8team/java

$ sudo apt-get update

$ sudo apt-get install oracle-java8-installer # (change to ...java7-... if that's what you need)

$ sudo update-alternatives --config java # (to set the default to the default version required by the system)

For me the options were set as:

  Selection    Path                                                          Priority    Status

  0            /usr/lib/jvm/java-8-oracle/jre/bin/java              1072      auto mode

* 1            /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java   1071      manual mode

  2            /usr/lib/jvm/java-8-oracle/jre/bin/java              1072      manual mode

Press enter to keep the current choice[*], or type selection number: 1 # <-- choice to set default version

The next step was:

$ sudo nano /etc/environment # (to add the environment variable to direct PyCharm to the correct JAVA version

and add the line --> PYCHARM_JDK="/usr/lib/jvm/java-8-oracle/jre"

Hope this might help others!

0
Avatar
Permanently deleted user

For reference: I had to change the JVMVersion value in the idea.properties file for it to be recognized by the IDE (Android Studio 1.3).
Changing it in the Info.plist file doesn't have any influence with my installation.

0
Avatar
Permanently deleted user

The above article still states, that Apple JDK 1.6 is required to run your products. However, in the Info.plist of IntelliJ IDEA 14 the key "JVMVersion" is set to "1.6*,1.7+". I am running Mac OS Yosemite and have never installed JDK 1.6. IntelliJ IDEA does not seem to mind and works perfectly. Is the article up to date?

0

Right, MAC USER here. I have a weird issue.
I was using PhpStorm 9 and EAP9.5 just fine, then I upgraded to El Capitan (from Yosemite). Usual missing JAVA at startup, fine. This time I chose not to install the legacy Java 6, but Oracle Java 8.

Long story short, PhpStorm won't start. I won't detect the JVM even when everything is rightly installed and setup. And, amazingly, not even PhpStorm with the bundled JVM starts! It throws the same message that says there is not suitable JVM!

This could help: if I start PhpStorm (even the one with no bundled JVM) as a Guest user on Mac (a user that always has no previous settings for anything), everything works.

Any particular setting file or similar that, under my own user, would prevent PhpStorm to detect the JVM correctly?

Thanks.

0

Please sign in to leave a comment.

Have more questions?

Submit a request