macos 我如何在 mac 上的 intellij 9 中设置 jdk
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2993601/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how can i set the jdk in intellij 9 on mac
提问by Ali_IT
I have a project on intellij and now i wanna run it on intellinj 9 on mac. when i run the project i get the error -> "the JDK is not specifiedfor module "XXXXX" specify the JDK in Configuration project". when i go there in the dependencie for module SDk there is No Project JDk. and when i click on new it is just JSDK, Intellij idea plugin SDK,Flex SDK,AIR SDK, Flexmojos SDk and Mobile SDK
我有一个关于 intellij 的项目,现在我想在 mac 上的 intellinj 9 上运行它。当我运行项目时,出现错误 ->“未为模块“XXXXX”指定 JDK,请在配置项目中指定 JDK”。当我在模块 SDk 的依赖项中去那里时,没有项目 JDk。当我点击 new 时,它只是 JSDK、Intellij idea 插件 SDK、Flex SDK、AIR SDK、Flexmojos SDk 和 Mobile SDK
What can I do?
我能做什么?
回答by CrazyCoder
Refer to the documentation. You need to add new JSDK with the following path:
请参阅文档。您需要使用以下路径添加新的 JSDK:
/System/Library/Frameworks/JavaVM.Framework/Versions/CurrentJDK/Home
回答by Ed J
Agreed. Going one step further, I would recommend setting up the different sdk's explicitly for Java 5, 6, etc.
同意。更进一步,我建议为 Java 5、6 等明确设置不同的 sdk。
On OS 10.6, use:
在 OS 10.6 上,使用:
/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home