给IDEA设置单独的JDK

一、系统参数设置:

1.64位IDEA:增加IDEA_JDK_64系统变量

2.32位IDEA:增加IDEA_JKD系统变量

如图:

二、参考说明

https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under

详情如下:

<product>.exe uses this JDK search sequence:

  1. IDEA_JDK / PHPSTORM_JDK / WEBIDE_JDK / PYCHARM_JDK / RUBYMINE_JDK /CLION_JDK / DATAGRIP_JDK environment variable (depends on the product,WEBIDE_JDK applies to both WebStorm and PhpStorm before version 2016.1)

  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 / PHPSTORM_JDK / WEBIDE_JDK / PYCHARM_JDK / RUBYMINE_JDK/ CLION_JDK / DATAGRIP_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.8.0_66
  • 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 / CLION_JDK / DATAGRIP_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.

转载于:https://my.oschina.net/liuyuantao/blog/1486940

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值