What's the accepted procedure and paths to configure jdk and global library source code for Intellij IDEA on OS X?
IntelliJ IDEA is a cross-platform IDE that provides consistent experience on the Windows, macOS, and Linux operating systems. IntelliJ IDEA is available in the following editions: Community Edition is free and open-source, licensed under Apache 2.0. It provides all the basic features for JVM and Android development.
Run the IntelliJ IDEA app from the Applications directory, Launchpad, or Spotlight. Run the idea.sh shell script in the installation directory under bin. You can also use the desktop shortcut, if it was created during installation.
macOS: ~/Library/Application Support/JetBrains/Toolbox/apps.
As of the latest releases:
Apple has moved things around a bit.
To quote the Apple Java guy on the java-dev mailing list:
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!
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.
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
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
In the 'Project Settings' window, go to 'JDKs' section that you see under'Platform Settings'. Click the little plus sign and choose 'JSDK'. A file chooser should open in the /System/Library/Frameworks/JavaVM.framework/Versions directory. If not then just navigate to it. There you can choose the version you would like to add.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With