OS X 上的 Intellij IDEA 设置 [英] Intellij IDEA setup on OS X

查看:29
本文介绍了OS X 上的 Intellij IDEA 设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 OS X 上为 Intellij IDEA 配置 jdk 和全局库源代码的可接受程序和路径是什么?

解决方案

截至最新版本:

  • 适用于 Mac OS X 10.6 更新 3 的 Java
  • 适用于 Mac OS X 10.5 更新 8 的 Java

Apple 改变了一些东西.

引用 java-dev 邮件列表中的 Apple Java 人员:

<块引用>

  1. 系统 JVM 位于/System/Library/...

    • 这些 JVM 仅由 Apple 提供,并且只有 1 个主要一次平台版本.
    • 一个版本总是会升级,而且只能通过 Apple 软件更新.
    • 它应该始终是 GM 版本,开发人员可以恢复到,尽管任何开发者预览或第 3 方他们已安装的 JVM.
    • 与/System 中的其他所有内容一样,它归根 r-x 所有,所以不要搞砸用它!
  2. 开发者 JVM 位于/Library/Java/JavaVirtualMachines

    • Apple Java Developer Previews 安装在/Library 下.
    • Developer .jdk 包包含开发者可能需要的一切(src.jar、docs.jar 等),但也是大到数千万Mac 客户.
    • 第 3 方 JVM 应安装在此处.
  3. 在 JVM 本身上工作的开发人员可以使用~/Library/Java/JavaVirtualMachines

    • 从这里符号链接到您当前的构建产品很方便目录,不会影响其他用户
  4. Java IDE 应该倾向于使用/Library 或 ~/Library 检测到JVM,但应该能够回退使用/System/Library JVMs 如果那是唯一安装的(但是不要期待 src 或 JavaDoc).

这允许 Java 开发人员最大的安装灵活性多个版本的 JVM 回归错误,甚至在 Mac 上开发 JVM他们自己.它还确保所有Mac 客户拥有一款安全、纤薄、JVM 的安全版本,并且我们不要无休止地占用他们的磁盘空间每次我们软件更新他们JVM.

因此,不应将 Intellij 指向/System/Library/Frameworks/JavaVM.framework,而应指向/Library/Java/JavaVirtualMachines 或/System/Library/Java/JavaVirtualMachines 中的 JDK

What's the accepted procedure and paths to configure jdk and global library source code for Intellij IDEA on OS X?

解决方案

As of the latest releases:

  • Java for Mac OS X 10.6 Update 3
  • Java for Mac OS X 10.5 Update 8

Apple has moved things around a bit.

To quote the Apple Java guy on the java-dev mailing list:

  1. System JVMs live under /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!
  2. Developer JVMs live under /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.
  3. Developers working on the JVM itself can use ~/Library/Java/JavaVirtualMachines

    • It's handy to symlink to your current build product from this directory, and not impact other users
  4. Java IDEs should probably bias to using /Library or ~/Library detected JVMs, but should be able to fallback to using /System/Library JVMs if that's the only one installed (but don't expect src or JavaDoc).

This allows Java developers the maximum flexibility to install multiple version of the JVM to regress bugs and even develop a JVM on the Mac themselves. It also ensures that all Mac customers have one safe, slim, secure version of the JVM, and that we don't endlessly eat their disk space every time we Software Update them a JVM.

So, instead of pointing Intellij at /System/Library/Frameworks/JavaVM.framework, you should point to a JDK in either /Library/Java/JavaVirtualMachines or /System/Library/Java/JavaVirtualMachines

这篇关于OS X 上的 Intellij IDEA 设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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