Selecting the JDK version the IDE will run under

All the products on all the supported platforms already have 64-bit JetBrains Runtime 11 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 11 version to run. Our IDEs will not run on the older Java versions like Java 8.

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 11 options or click Add JDK
  4. To add a new JDK specify the home folder of the Java 11 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 (32-bit JDK can be downloaded on Windows by the installer if needed).

<product>.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 (depends on the product, WEBIDE_JDK applies to both WebStorm and PhpStorm before version 2016.1)

  2. idea.config.path\<product>.exe.jdk file
  3. ..\jbr-x86 directory
  4. system Registry
  5. JDK_HOME environment variable
  6. JAVA_HOME environment variable

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

  1. IDEA_JDK_64 / PHPSTORM_JDK_64 / WEBIDE_JDK_64 / PYCHARM_JDK_64 / RUBYMINE_JDK_64 / CL_JDK_64 / DATAGRIP_JDK_64 / GOLAND_JDK_64 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. ..\jbr-x86 directory
  6. JDK_HOME environment variable
  7. JAVA_HOME environment variable
Environment variable must point to the JDK installation home directory, for example:
c:\Program Files (x86)\Java\jdk11.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 11 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-11.jdk/Contents/Home
202 comments
Comment actions Permalink
@Serge Baranov, thank you for the reply. I was going to update PyCharm (https://www.jetbrains.com/help/pycharm/update.html) it but I'm unsure how to do so since PyCharm isn't starting on my machine so I can't detect any updates. Would I have to uninstall it and reinstall the latest version?
0
Comment actions Permalink

@Serge Baranov

Thank you! I think that solved my problem.

0
Comment actions Permalink

Good my font issue is Fixed for 2019.3 update.

defaut jre has font feel bad

0
Comment actions Permalink

Following these instructions completely bricked my install of intellij. Upon selecting the version (step 3), intellij exited, and when I tried to relaunch it, I received a message saying the application cannot be opened.

 

0
Comment actions Permalink

You can revert the change by deleting idea.jdk file from the config directory. Most likely, you've chosen some incompatible JDK build.

0
Comment actions Permalink

Serge Baranov I just chose the adoptopenjdk11 install I installed via homebrew and have configured via jenv.

0
Comment actions Permalink

You should use JetBrains Runtime to run IntelliJ IDEA. The default one is highly recommended.

0
Comment actions Permalink

I'm on IntelliJ 2019.3 (Build #IU-193.5233.102), trying to update the JBR from 11.0.4+10-b520.11 x86_64 to the latest JBR 11.0.6(818). When I use the Choose Runtime plugin, the app won't launch. Console logs look like this:

2020-04-07 11:20:09.807 idea[43949:1458920] Value of IDEA_VM_OPTIONS is (null)
2020-04-07 11:20:09.807 idea[43949:1458920] Processing VMOptions file at /Users/username/Library/Preferences/IntelliJIdea2019.3/idea.vmoptions
2020-04-07 11:20:09.807 idea[43949:1458920] Done
Error: could not find libjava.dylib
Failed to GetJREPath()
2020-04-07 11:20:09.808 idea[43949:1458920] JNI_CreateJavaVM (/Library/Java/JavaVirtualMachines/jbr-11_0_6.jdk) failed: 4294967295

If I remove idea.jdk and re-run, I basically go back to the previous version without a problem.

The reason I am changing this is to try to avoid IDEA-207243 where my CPU runs high % (like 300-400%) when I'm typing. 

jenv versions returns this, if that matters, but I feel like it doesn't:

system
* 1.8 (set by /Users/username/.jenv/version)
1.8.0.231
11.0
11.0.6
13
openjdk64-11.0.6
openjdk64-13
oracle64-1.8.0.231
oracle64-13

Any ideas?

0
Comment actions Permalink

It's really not trivial even to understand what is the latest available JetBrains JDK using "Choose Runtime" Plugin.

The dropdown list is a multitude of different major and minor versions and naming conventions.

Which version is newer: jbsdk11b125_osx_x64.tar.gz or maybe jbrsdk-11_0_7-osx-x64-b875.1.tar.gz ?

Not to mention literal sorting doesn't really work in such conditions.

IMHO it should solve a simple use case: Select and Install Latest JetBrains Runtime.

Edited by Ivan Balashov
0
Comment actions Permalink

This plug-in is needed when you were instructed by the support team or by the developers to use some specific runtime version in order to try some fix or a workaround for a problem. In all the other cases you should not override the runtime and use the default one that is bundled with the product.

Your usability concerns are valid and I've reported the same to the responsible developer long time ago. In any case, the plug-in is open source and you are welcome to contribute if you are interested: https://github.com/denis-fokin/ChooseRuntime .

1
Comment actions Permalink

Some link in this article are dead!  e.g. config folder (https://intellij-support.jetbrains.com/hc/articles/206544519)  what is this 'config folder'?? I am getting mad of this. There are so many deadlink in this article...

Edited by Clifflinmao
0
Comment actions Permalink

Clifflinmao Thanks for the report. I've fixed the links (the issue was specific to the users with non-English language selected when using the knowledge base). See https://www.jetbrains.com/help/idea/tuning-the-ide.html#config-directory for the config directory location.

0
Comment actions Permalink

Please help. I've installed IDEA 2020.3 and all of my gradle 2.x projects are broken. This article's workaround (set IDE to use JDK 8) worked with 2020.2. However with 2020.3, when I perform the steps outlined in this article, IntelliJ fails to start with the error that JDK 11 is required.

Is IDEA 2020.3 no longer capable of running under JDK 8??

Is this article no longer valid?

Thanks.

Edited by Brandon Bird
1
Comment actions Permalink

Brandon Bird

Update Gradle or downgrade to IntelliJ IDEA 2020.2. There is no other solution, sorry.

0
Comment actions Permalink

Use this command:

gsettings set org.gnome.desktop.interface scaling-factor 1
0
Comment actions Permalink

I'm running macOS 12 latest beta (21A5506j). None of the JetBrains apps open, they all refuse to open with no warning if launched from the GUI. If I run them from the terminal, I see that the JetBrains Java Runtime is crashing with the error I include at the end of the comment.

Trying to change the JRE used by this method doesn't seem to change anything. Is there anything I can do to fix this?

#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000011f421ddc, pid=74007, tid=40195
#
# JRE version: OpenJDK Runtime Environment JBR-11.0.11.9-1504.16-jcef (11.0.11+9) (build 11.0.11+9-b1504.16)
# Java VM: OpenJDK 64-Bit Server VM JBR-11.0.11.9-1504.16-jcef (11.0.11+9-b1504.16, mixed mode, tiered, compressed oops, g1 gc, bsd-aarch64)
# Problematic frame:
# J 236 c2 com.intellij.util.io.Murmur3_32Hash.hashBytes([BII)I (109 bytes) @ 0x000000011f421ddc [0x000000011f421c80+0x000000000000015c]
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/alice/java_error_in_webstorm_74007.log
Compiled method (c2) 255 236 4 com.intellij.util.io.Murmur3_32Hash::hashBytes (109 bytes)
total in heap [0x000000011f421a90,0x000000011f4221c0] = 1840
relocation [0x000000011f421c00,0x000000011f421c48] = 72
main code [0x000000011f421c80,0x000000011f421f40] = 704
stub code [0x000000011f421f40,0x000000011f421fd0] = 144
oops [0x000000011f421fd0,0x000000011f421fd8] = 8
metadata [0x000000011f421fd8,0x000000011f421ff0] = 24
scopes data [0x000000011f421ff0,0x000000011f4220f8] = 264
scopes pcs [0x000000011f4220f8,0x000000011f4221a8] = 176
dependencies [0x000000011f4221a8,0x000000011f4221b0] = 8
nul chk table [0x000000011f4221b0,0x000000011f4221c0] = 16
Could not load hsdis-aarch64.dylib; library not loadable; PrintAssembly is disabled
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
1
Comment actions Permalink

Try try workaround from JBR-3715 mac os 12 beta6 Unable to start IDEA

Add the following VM options:

-XX:+TieredCompilation 
-XX:TieredStopAtLevel=1
Edited by Andrey Dernov
1
Comment actions Permalink

That worked, thank you!

1
Comment actions Permalink

Hi,

I am developing custom plugin and wanted to try java 16 features.
But during IDE restart I get error:
Caused by: com.intellij.diagnostic.PluginException: Cannot load class xxxx (
error: xxxx has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 55.0,
classLoader=PluginClassLoade...

When it is possible to use newer java version (16, 17) ?

BR
Toivo

0
Comment actions Permalink

Toivo Adams It's work in progress, you can find more details/workarounds at https://youtrack.jetbrains.com/issue/JBR-745.

0
Comment actions Permalink

JBR is based on JDK 11.  It is very slow on Linux, and I am having a much better time using the JDK 15 version of Azul Zulu or Zing JVMs (the latter without kernel modules).

I want to take advantage of the performance improvements in the latest JDKs.  Why, in 2021, is JetBrains not supporting this?

Edited by George Cox
0

Please sign in to leave a comment.

Have more questions?

Submit a request