IntelliJ,“所选择的目录不是JDK的家” [英] IntelliJ, "The selected directory is not a home for JDK"

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

问题描述

我刚刚安装了IntelliJ(我被告知它远远优于Eclipse),而且我正在尝试设置它,并将所有我的旧项目从eclipse导入。我已经到了我需要为我的SDK选择我的主目录的部分。我试图导航到我的java安装,(C:\Program Files(x86)\Java),并点击好,但它告诉我上面的消息。所以,我尝试了另一个目录(C:\Program Files(x86)\Java\jre7),这也没有。我尝试重新安装最新的JDK(从这里),我仍然无法选择我的JDK。我甚至拖动了我从网站获得的.jar安装程序,文件选择器窗口将无法识别它。我处于停顿状态,我不知道该怎么做。

I just installed IntelliJ, (I'm told it's far superior to Eclipse) and I'm trying to set it up and import all my old projects from eclipse. I've gotten to the part where I need to select my home directory for my SDK. 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 another directory, (C:\Program Files (x86)\Java\jre7), and that didn't work either. 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 dir。 JDK dir。例如(取决于更新,是64位还是32位): C:\Program Files(x86)\Java\jdk1.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,“所选择的目录不是JDK的家”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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