在OS X上为Intellij IDEA配置jdk和全局库源代码的公认步骤和路径是什么?
发布于 2010-11-01 13:44:16
从最新版本开始:
适用于Mac OS X 10.6的
苹果已经改变了一些东西。
引用java-dev邮件列表上的Apple Java家伙的话:
/System/Library/...下的
- These JVMs are only provided by Apple, and there is only 1 major platform version at a time.
- The one version is always upgraded, and only by Apple Software Updates.
- It should always be GM version, that developers can revert back to, despite any developer previews or 3rd party JVMs they have installed.
- Like everything else in /System, it's owned by root r-x, so don't mess with it!
/Library/Java/JavaVirtualMachines下的
- Apple Java Developer Previews install under /Library.
- The Developer .jdk bundles contain everything a developer could need (src.jar, docs.jar, etc), but are too big to ship to the tens of millions of Mac customers.
- 3rd party JVMs should install here.
使用JVM本身的
。
- It's handy to symlink to your current build product from this directory, and not impact other users
这允许Java开发人员最大限度地灵活地安装多个版本的JVM,以减少bug,甚至在Mac上自己开发JVM。它还确保所有Mac客户都有一个安全、轻薄、可靠的JVM版本,并且我们不会在每次软件更新JVM时无休止地消耗他们的磁盘空间。
因此,您应该指向/Library/Java/JavaVirtualMachines或/System/Library/Java/JavaVirtualMachines中的JDK,而不是将Intellij指向/System/Library/Frameworks/JavaVM.framework
发布于 2009-01-22 22:20:32
在“项目设置”窗口中,转到“平台设置”下看到的“JDK”部分。单击小加号并选择“JSDK”。应在/System/Library/Frameworks/JavaVM.framework/Versions目录中打开一个文件选择器。如果不是,那么就导航到它。在这里你可以选择你想要添加的版本。
发布于 2009-01-22 22:19:29
IntelliJ应该能检测到你安装的JDK,因为它们位于苹果提供的标准位置。如果你想要JDK的源代码,你也可以从Apple下载。注册一个免费的ADC帐户,然后你就可以访问了。
对于全局库,我很喜欢最近版本中的Maven集成。它通过从Maven存储库中提取内容,减少了设置全局库的需要。它还将下载源代码和javadoc jar。
https://stackoverflow.com/questions/470882
复制相似问题