问题描述
我刚刚安装了 IntelliJ IDEA,我正在尝试设置它.我已经到了需要为我的 JDK 选择主目录的部分.
I just installed IntelliJ IDEA and I'm trying to set it up. I've gotten to the part where I need to select my home directory for my JDK.
我尝试导航到我的 Java 安装,C:Program Files (x86)Java
,然后单击 OK,但它告诉我上面的消息.所以,我尝试了 C:Program Files (x86)Javajre7
,但也没有奏效.
I tried navigating to my Java installation, C:Program Files (x86)Java
, and clicked okay but it told me the message above. So, I tried C:Program Files (x86)Javajre7
and that didn't work either.
我尝试重新安装最新的 JDK(来自 这里) 并且我仍然无法选择我的 JDK.我什至拖动了从网站上获得的 .jar
安装程序,但文件选择器窗口无法识别它.
I tried reinstalling the latest JDK (from here) and I still couldn't choose my JDK. I even dragged the .jar
installer I got from the website and the file selector window wouldn't recognize it.
我处于停滞状态,我不知道该怎么办.
I'm at a standstill and I don't know what to do.
推荐答案
因为您选择的是 jre
目录.而不是 JDK
目录.JDK
目录.例如(取决于更新以及它是 64 位还是 32 位):C:Program Files (x86)Javajdk1.7.0_45
就我而言,它是 32 位 JDK 1.7
update 45
Because you are choosing jre
dir. and not JDK
dir. JDK
dir. is for instance (depending on update and whether it's 64 bit or 32 bit): C:Program Files (x86)Javajdk1.7.0_45
In my case it's 32 bit JDK 1.7
update 45
这篇关于IntelliJ IDEA“所选目录不是JDK的有效主目录"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!