This help center has been deprecated and moved to a new address, please follow this link to open an active help center.

Thank you and sorry for inconvenience!



Follow

Selecting the JDK version the IDE will run under

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:

  1. IDEA_JDK / WEBIDE_JDK / PYCHARM_JDK / RUBYMINE_JDK environment variable (depends on the product, WEBIDE_JDK applies to both WebStorm and PhpStorm)

  2. ..\jre directory
  3. system Registry
  4. JDK_HOME environment variable
  5. JAVA_HOME environment variable

idea64.exe uses this JDK search sequence:

  1. IDEA_JDK_64 environment variable
  2. ..\jre64 directory
  3. system Registry
  4. JDK_HOME environment variable
  5. 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 / WEBIDE_JDK / PYCHARM_JDK / RUBYMINE_JDK environment variable (depends on the product)
  2. ..\jre directory
  3. JDK_HOME environment variable
  4. JAVA_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 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

  • Avatar
    Serge Baranov

    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.

  • Avatar
    Pahan

    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?

  • Avatar
    Serge Baranov

    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.

  • Avatar
    Pahan

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

  • Avatar
    Andreas Unterweger

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

  • Avatar
    Serge Baranov

    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.

  • Avatar
    Andreas Unterweger

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

  • Avatar
    Sendi T34

    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 ?

  • Avatar
    Emmanuel Sarella

    If you are using 0xDBE the path variable is dbe_JDK

  • Avatar
    Palakmathur

    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).

  • Avatar
    Serge Baranov

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

  • Avatar
    Jason Messmer

    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. 

  • Avatar
    Daniel Nienhaus

    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!

  • Avatar
    Serge Baranov

    You can use 1.8 Oracle JDK or OpenJDK on Linux.

  • Avatar
    Daniel Nienhaus

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

  • Avatar
    Jim Watson

    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.

  • Avatar
    Graeme Gummow

    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!

  • Avatar
    Gui W

    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.

  • Avatar
    Timo Kockert

    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?

  • Avatar
    Vincenzo Russo

    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.

  • Avatar
    Flemming Jønsson

    @Vicenzo - I don't know what might cause your problems.
    Have you tried using the IDEA_JDK environment variable and launching PHPStorm from your terminal.
    Something along these lines:
    cd project_folder
    export IDEA_JDK=$(/usr/libexec/java_home)
    open -a PHPStorm .

    Does that work?

  • Avatar
    Vincenzo Russo

    As it always happens, you spend half a day on this, then decide to ask some one else, and you solve the issue right after...

    It was the settings in ~/Library/Preferences/WebIde95/idea.properties
    Specifically,

    ./idea.properties:20:JVMVersion=1.6*

    That had to be changed to 1.8.

    It'd be nice if the IDE wouldn't rely on those settings generated at the time of the first execution (I believe).

  • Avatar
    Flemming Jønsson

    Doh - typing an underscore triggers italics.
    The variable that needs to be set is IDEA underscore JDK

  • Avatar
    Vincenzo Russo

    Hi Flemming, yes, I had tried that... no joy.
    If you see my comment before this one, it'd seem that the IDE disregards everything once the JVMVersion property has been written to ~/Library/Preferences/<Product><Version>/idea.properties

  • Avatar
    Frank Bian

    I run IDEA 14.1.5 on OS X EI Capitan, and follow the given step to change the JVMVersion from 1.6* to 1.7* .But it doesn't work ,and the error tip is "the intellij idea unable to find a valid JVM" . Actually I hava jdk 1.7 and 1.8 , the JAVA_HOME points to 1.7 version, and the environment variables work well.

  • Avatar
    Vincenzo Russo

    Frank, if you were using the IDE before the upgrade to El Capitan, please see my comments above.

    Go to

    ~/Library/Preferences/<Product><Version>/idea.properties

    Edit it

    and change

    JVMVersion=1.6*

    to what you need.

  • Avatar
    Frank Bian

    Eh ... I find that the JVMVersion's string value would be uesd to match the FILE NAME in the path "/Library/Java/JavaVirtualMachines/" . So it will not work any more if the file name doesn't contain the String "1.6/1.7/1.8" ...

  • Avatar
    Frank Bian

    Hi Vincenzo,
    like my above comment, my JDK folder's name is "jdk7" and "jdk8", then I guess the file name should contain the JVMVerson String value, and it works after I renamed my JDK folder from "jdk7(jdk8)" to "jdk1.7(jdk1.8)"...

  • Avatar
    Serge Baranov

    Just use http://download.jetbrains.com/idea/ideaIU-14.1.5-custom-jdk-bundled.dmg . Also, IDEA 15 will come with Java 8 by default (will be released in November).

  • Avatar
    Vincenzo Russo

    Serge, even the bundled one won't work if you opened the same version (but unbundled) before when using Java6, as ~/Library/Preferences/<Product><Version>/idea.properties would already be written.

    Frank: I don't find that to be the case. I just changed JVMVersion to 1.8 and it picked up my JDK 8 from Oracle.

Powered by Zendesk