IntelliJ IDEA“所选目录不是JDK的有效主页” [英] IntelliJ IDEA "The selected directory is not a valid home for JDK"

查看:1992
本文介绍了IntelliJ IDEA“所选目录不是JDK的有效主页”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了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 ,点击没关系,但它告诉我上面的消息。所以,我尝试了 C:\Program Files(x86)\ Java @ \\ _jre7 ,但这也无效。

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)\Java\jre7 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 dir。而不是 JDK 目录。 JDK dir。例如(取决于更新以及它是64位还是32位): C:\Program Files(x86)\ Java \ _ddk1.7.0_45
在我的情况下,它是32位 JDK 1.7 更新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)\Java\jdk1.7.0_45 In my case it's 32 bit JDK 1.7 update 45

这篇关于IntelliJ IDEA“所选目录不是JDK的有效主页”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆