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
- 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.
- 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.
- Click the OK button and wait until the file with JetBrains Runtime is downloaded and configured.
- Restart the IDE to try the new runtime.
- 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).
- 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
- Follow the steps from the section above to open the Choose Boot Java Runtime for the IDE dialog.
- Use the Add Custom Runtime option
- Select one of the already installed JDK 21 options or click Add JDK
- 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
- Open the Choose Boot Java Runtime for the IDE dialog as described above
- Click the Use Default Runtime button
- 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:
- IDEA_JDK / PHPSTORM_JDK / WEBIDE_JDK / PYCHARM_JDK / RUBYMINE_JDK / CL_JDK / DATAGRIP_JDK / GOLAND_JDK environment variable
- idea.config.path\<product>64.exe.jdk file
- ..\jbr 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 / PHPSTORM_JDK / WEBIDE_JDK / PYCHARM_JDK / RUBYMINE_JDK / CL_JDK / DATAGRIP_JDK / GOLAND_JDK environment variable (depends on the product)
- idea.config.path\<product>64.exe.jdk file
- idea.config.path\<product>.exe.jdk file
- ..\jbr directory
- JDK_HOME environment variable
- JAVA_HOME environment variable
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
Please sign in to leave a comment.
Attach the output again.
The following did the trick:
typeset -x -g IDEA_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk
Interesting. Why was it null? And no I did not change any property files. At least not since the update from IDEA 15.
IDEA_JDK is not needed, by default IDE will use the bundled JDK.
The requested output from a fresh command line (to make it fail):
—————
>/Applications/Developer/IntelliJ\ IDEA\ CE.app/Contents/MacOS/idea
2016-03-26 11:40:21.640 idea[2520:32862] Value of IDEA_JDK: (null)
2016-03-26 11:40:21.640 idea[2520:32862] Reading at /Users/martin/Library/Preferences/IdeaIC2016.1/idea.properties OK
2016-03-26 11:40:21.642 idea[2520:32862] Found Java Virtual Machines:
2016-03-26 11:40:21.642 idea[2520:32862] /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk
2016-03-26 11:40:21.642 idea[2520:32862] /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk
2016-03-26 11:40:21.642 idea[2520:32862] /Applications/Developer/IntelliJ IDEA CE.app/Contents/jre/jdk
2016-03-26 11:40:21.642 idea[2520:32862] /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk
2016-03-26 11:40:21.642 idea[2520:32862] /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk
2016-03-26 11:40:21.642 idea[2520:32862] /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk
2016-03-26 11:40:21.642 idea[2520:32862] /Library/Java/JavaVirtualMachines/1.6.0.jdk
2016-03-26 11:40:21.642 idea[2520:32862] Required VMs: 1.6*
2016-03-26 11:40:21.642 idea[2520:32862] Chosen VM:
2016-03-26 11:40:21.642 idea[2520:32862] /Library/Java/JavaVirtualMachines/1.6.0.jdk
2016-03-26 11:40:21.647 idea[2520:32873] fullFileName is: /Applications/Developer/IntelliJ IDEA CE.app/Contents/bin/idea.vmoptions
2016-03-26 11:40:21.647 idea[2520:32873] fullFileName exists: /Applications/Developer/IntelliJ IDEA CE.app/Contents/bin/idea.vmoptions
2016-03-26 11:40:21.647 idea[2520:32873] Value of IDEA_VM_OPTIONS is (null)
2016-03-26 11:40:21.647 idea[2520:32873] Processing VMOptions file at /Applications/Developer/IntelliJ IDEA CE.app/Contents/bin/idea.vmoptions
2016-03-26 11:40:21.647 idea[2520:32873] Reading at /Applications/Developer/IntelliJ IDEA CE.app/Contents/bin/idea.vmoptions OK
2016-03-26 11:40:21.647 idea[2520:32873] Done
Unsupported Java Version: Cannot start under Java 1.6.0_65-b14-468-11M4833: Java 1.8 or later is required.
—————
Interesting again: Required VMs: 1.6* — where did that one come from? I checked the Info.plist — it correctly requests 1.8.
It comes from your /Users/martin/Library/Preferences/IdeaIC2016.1/idea.properties file which was migrated from the previous version, see https://youtrack.jetbrains.com/issue/IDEA-153217 that I've already linked above.
For PyCharm on Mac, the file name is pycharm.jdk and not charm.jdk as mentioned.
Run the following command in Terminal:
echo "/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk" > ${HOME}/Library/Preferences/PyCharm2016.1/pycharm.jdk
Replacing the string "jdk1.8.0_77" with whatever version of Java you have installed.
Hello! I've just installed PyCharm 2016.1.3, since i'm on windows and i need to run 64-bit (i need to use the ODBC data sources on the machine), i need to install JDK 8. The JDK available to my firm is only JDK 1.8.0_05. I've defined PYCHARM_JDK variable and pointed it to:
C:\Program Files\Java\jdk1.8.0_05.
PyCharm now starts, but it doesn't support 64-bit functionality, meaning, my ODBC data sources are not supported and i'm receiving an error when i try to run a query against them:
Exception in thread "main" java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver
I confirm that PyCharm is running as 64-bit:
PyCharm 2016.1.3
Build #PY-145.971, built on May 3, 2016
JRE: 1.8.0_05-b13 amd64
JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation
So, is this JDK not supported or is this an issue?
It's unrelated to JDK, please submit a ticket to support and attach a screenshot with your JDBC driver configuration (jar files) in the database connection properties.
WIth the release of IntelliJ 2016.2, I see this noted in the blog post announcing it:
Installer
Last but not least, the Windows installer now includes our custom JDK build with fixes that address focus and font rendering issues.
But it appears that is still just the 32-bit JDK (or it seems JRE as that's what the directory is called: "IntelliJ IDEA 2016.2\jre". Is this correct? If we use the 64-bit version do we still have to point IDEA_JDK_64 to our own install? (Seems so from the experimenting I've done.)
Is the 64-bit version slated to get a bundled JDK/JRE build with fixes for these issues at some point?
Also, idea.bat seems to only want to run idea.exe the way it is written. In fact, it has one issue around 10 lines down where it is using the variable %BITS% which hasn't been set yet. That seems bad to me.
Only 32-bit JDK is bundled, just like before. What has changed is that we bundle our custom OpenJDK instead of Oracle JDK like we did before.
64-bit version of the custom OpenJDK is available at https://bintray.com/jetbrains/intellij-jdk/.
Thanks for pointing to the %BITS% issue in idea.bat, we'll investigate it.
Out of curiosity, why don't you package the x64 version or at least have a downloadable package for it instead of requiring folks to pull and build it?
The link above points to the binary builds, you just download and unpack it into IDEA_HOME/jre64 folder. For example, here is the link to the current Windows version of the custom 64-bit JDK: https://bintray.com/jetbrains/intellij-jdk/download_file?file_path=jbsdk8u76b218_windows_x64.tar.gz.
We don't package it by default to save size of the distribution since for the most users 32-bit version will work just fine. 64-bit version is needed only in case you need to use heap sizes higher than 1GB (when working with large projects or many projects at the same time). 64-bit version has more RAM overhead. Bundling both versions would make the download size much larger, bundling only 64-bit version will make it unusable for users on 32-bit systems.
/facepalm
I see, they were over under files. I saw this on the Windows x64 page:
No direct downloads selected for this package.
and ended up wandering into the GitHub page and thinking there was no download from there. Oddly confusing UI, IMO. Thanks. BTW, it would be nice to at least make it an optional "would you like to download and install our 64-bit JRE" in the installer. Then folks could decide if they needed it.
I've added a request at https://youtrack.jetbrains.com/issue/IDEA-158522. Feel free to vote.
Either this is no longer true, or I'm missing something about JDK/JRE differences.
"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."
It seems like this is a JRE and not a JDK, since I cannot choose this as an SDK for a project. I'm by no means an expert on jdk/jre and might be misunderstanding the capabilities, but I would expect a JDK to work as a project SDK. (While I wouldn't with a JRE)
Yes, the wording is confusing, and what we bundle it's technically a Runtime that can be used only for running the IDE, not as a project JDK. It's also not a JRE since JRE doesn't include tools.jar that is required to run IntelliJ IDEA.
See also https://www.jetbrains.com/help/idea/requirements-for-intellij-idea.html:
JRE 1.8 is bundled with distributions for all platforms. You don't need any Java to be installed on your machine in order to run IntelliJ IDEA.
JDK is not required for developing Web, PHP, Ruby or Python projects in IntelliJ IDEA. The standalone JDK installation is required for Java development only.
However, you CANNOT use our bundled JRE for Java development.
How to correct an error?
Gradle sync failed: The newly created daemon process has a different context than expected.
It won't be possible to reconnect to this daemon. Context mismatch:
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2016.3\jre,daemonRegistryDir=C:\Users\Admin\.gradle\daemon,pid=5336,idleTimeout=null,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1251,-Duser.country=RU,-Duser.language=ru,-Duser.variant]
Actual: DefaultDaemonContext[uid=5ba9202e-aef4-44bc-835a-0fe9eef55258,javaHome=C:\Java\jdk1.8.0_111,daemonRegistryDir=C:\Users\Admin\.gradle\daemon,pid=4928,idleTimeout=60000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=windows-1251,-Duser.country=RU,-Duser.language=ru,-Duser.variant]
Consult IDE log for more details (Help | Show Log)
What value at the JAVA_HOME variable?
See https://youtrack.jetbrains.com/issue/IDEA-150625
my computer system is windows 10. i had setted a environment JDK_HOME ,then run idea64.exe, encounter a mistake, it seemly JDK_HOME is not support by idea64.exe. this is violated with above tutorial
What error do you get? Please contact support with more details.
The troubleshooting instructions for Windows includes the following statement: "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." I do not understand why IntelliJ needs the JDK to "RUN" on windows; I would think an updated JRE sufficient. Presumably, it would be wise to compile software with an updated JDK, so in that respect inclusion of an updated JDK with the IntelliJ installer would be prudent.
On a second point, am I correct in inferring that the JDK bundled with IntelliJ is that for a 32 bit computer? And that if the computer on which IntelliJ is to be installed is a 64 bit computer, then one must download and install the 64 bit JDK. These days aren't most computers (even laptops) 64 bit? Why not bundle both the 32 and 64 bit JDKs with IntelliJ? At the very least, why not bundle the most commonly used JDK (64 bit) with IntelliJ?
> I do not understand why IntelliJ needs the JDK to "RUN" on windows; I would think an updated JRE sufficient.
IntelliJ IDEA uses compiler APIs which are not available in JRE, therefore it needs JDK to run.
> On a second point, am I correct in inferring that the JDK bundled with IntelliJ is that for a 32 bit computer?
No, it works on both 32-bit and 64-bit.
> And that if the computer on which IntelliJ is to be installed is a 64 bit computer, then one must download and install the 64 bit JDK.
No, it works out of the box. Also, 64-bit JDK is default since 2017.1 version and 32-bit JDK is downloaded by the installer (optional).
> These days aren't most computers (even laptops) 64 bit? Why not bundle both the 32 and 64 bit JDKs with IntelliJ?
See above. 64-bit is default now, 32-bit is an optional download to save size of the installer on Windows.
> At the very least, why not bundle the most commonly used JDK (64 bit) with IntelliJ?
It's bundled since 2017.1 release.
The path given above, idea.config.path\<product>.jdk, seems to be wrong with the current products. At least the location was empty, and I found the JDKs installed under .WebStorm2017.1/config/jdks.
@Serge, thanks for that. You are indeed correct. The problem was just that this file never gets created, which made me search for alternative locations.
FYI, there seems to be some kind of logical build error in the Jetbrains Runtime, which you might spot from this:
carlerik@devbox:~/.WebStorm2017.1/config/jdks/jbsdk8u152b845.3_linux_x86/bin$ strings java | grep 1.8.0_76
1.8.0_76-release-845-b3
As you can see from the Version string on the Directory name, I should be running 1.8u152, but the internal strings says it is version 1.8u76. That also makes WebStorm complain about using an old Version.
What Java version is displayed in About dialog? What's the output from "~/.WebStorm2017.1/config/jdks/jbsdk8u152b845.3_linux_x86/bin/java -version" command?
$ ~/.WebStorm2017.1/config/jdks/jbsdk8u152b845.3_linux_x86/bin/java -version
openjdk version "1.8.0_76-release"
OpenJDK Runtime Environment (build 1.8.0_76-release-845-b3)
OpenJDK Server VM (build 25.76-b3, mixed mode)
Thank you, I've reported a bug: https://youtrack.jetbrains.com/issue/JRE-342.
That is the expected behavior, this file is created only if you have customized the runtime.