Idea Configuration startup jdk___ Select a custom 64-bit JVM when using IntelliJ idea in Windows

Source: Internet
Author: User

(This article: http://www.cnblogs.com/fanlinglong/p/6482841.html)

Configure your idea to launch the JDK (IDEA15 after version start not JDK1.8)

Add the environment variable idea_jdk_64, configure the same as the JAVA_HOME environment variable, and the path is written to the JDK of 1.8.

To this OK

The English text of this article from: Https://intellij-support.jetbrains.com/entries/23455956-Selecting-the-JDK-version-the-IDE-will-run-under
In the Java development process, we generally use the 32-bit JDK, because the development process requires frequent restart of the application, and requires less memory, so for the 64-bit JDK is not much necessary. But for the IDE used in development, it takes a long time to run, If you can optimize the efficiency of the IDE, then for the coding itself is very helpful, who do not want to be in the encoding machine response slow (think of a prompt key, and so on for half a day). This is why it is necessary to use the 64-bit server JVM. That is, the IDE uses a 64-bit server JVM. and development uses 32-bit JDK.

This article describes how to configure the 64-bit JDK in IntelliJ idea so that idea starts with a 64-bit JDK instead of the default 32-bit. The main introduction to how idea is to find the JDK for configuration use.

In the installation package provided by idea, a default JDK version is bound, which is normally all we need to do with this JDK. Just this JDK is 32 bits, meaning we can only support double-click Idea.exe to start idea.

If you need to use 64-bit idea, then we need to install a 64-bit JDK, and then idea64.exe follow certain rules to find the 64-bit JDK, if not found, the direct error. Of course, we can also customize this discovery process by idea.bat This script to configure the appropriate information.

32-bit Idea.exe

The 32-bit idea (that is, using Idea.exe) will use the following search order
1 environment variable IDEA_JDK (can be configured in environment variables for advanced properties)
2 Use the JDK in the JRE directory under the installation directory, this is 32-bit.
3 Using the registry (this is unclear how to find)
4 Configuring variables with the Jdk_home environment
5 using Java_home Environment configuration variables (the Java environment variables we typically configure)

64-bit Idea64.exe

The 64-bit idea (that is, using Idea64.exe) will use the following search order
1 environment variable idea_jdk_64 (one more _64 here)
2 using the JDK in the Jre64 directory under the installation directory, this default does not have this directory, we can put our 64-bit JDK in this directory
3 Registration Form
4 jdk_home environment variable, requires that the JDK in this environment variable must be 64-bit, otherwise this JDK will not be used
5 Java_home environment variables, also requires that the JDK in this variable is 64-bit

The main difference between this and the 32-bit is that IDEA_JDK's configuration variable names are different, and directory-based lookups use different directory names. In this way, we can retain the 32-bit configuration, can also save 64-bit configuration, using Idea.exe or Idea64.exe will be directly using the corresponding configuration of information, and will not overwrite the previous configuration or switch when modified, is a convenient way to handle it.

Using Idea.bat

If we use Idea.bat, we will follow the following search order
1 IDEA_JDK Configuration variable (if this version is 32-bit, the 32-bit version will be started or the 64-bit version will be started)
2 The JRE directory under the installation directory
3 Configuring the variable Jdk_home
4 Configuring the variable Java_home

With Idea.bat, the version of Idea is launched based on the JDK version acquired. In fact, it's the JDK that runs idea (which is written in Java). But a bit of a hassle is that this produces a cmd black box.

Notes
The configuration variables mentioned above must be the JDK installation directory, not the JRE installation directory. If we look at the JRE directory where idea comes in, you'll see that it's actually a JDK, but idea removes all the information that's not needed. Leave only the JRE directory inside and the information required at runtime.

The corresponding English text is as follows, copy it here.

JDK is bundled with all the product installers and it's recommended that's use the provided JDK version unless ther E is any specific issues.

32-bit JDK are located in Ide_home\jre directory and are used by the 32-bit product executable.
To run the IDE in 64-bit mode you'll need to download and install 64-bit JDK (not JRE) distribution and install it yours Elf. IDE would 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 bot H 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

Idea Configuration startup jdk___ Select a custom 64-bit JVM when using IntelliJ idea in Windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.