Mac OS上的IntelliJ IDEA JDK配置
我正在使用IntelliJ IDEA 10.每次创建新项目时,都要求我为此项目选择JDK。任何人都知道如何配置它并使其易于使用?
I am using IntelliJ IDEA 10. Every time when I create a new project, it is asking me to choose JDK for this project. Anyone know how I can configure it and make it easy to use?
如果您使用的是Mac OS X或Ubuntu,问题是由JDK的符号链接引起的。档案|无效缓存应该有所帮助。如果没有,请指定直接JDK主文件夹的JDK路径,而不是符号链接。
If you are on Mac OS X or Ubuntu, the problem is caused by the symlinks to the JDK. File | Invalidate Caches should help. If it doesn't, specify the JDK path to the direct JDK Home folder, not a symlink.
无效缓存菜单项在IntelliJ IDEA 文件菜单。
Invalidate Caches menu item is available under IntelliJ IDEA File menu.
最近Apple Java更新后的直接JDK路径:
Direct JDK path after the recent Apple Java update is:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
在IDEA中,您可以在文件|中配置新的JSDK项目结构,选择左侧的 SDK ,然后按 [+] 按钮,然后指定上面的JDK主路径,您应该得到以下内容:
In IDEA you can configure the new JSDK in File | Project Structure, select SDKs on the left, then press [+] button, then specify the above JDK home path, you should get something like this: