Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij IDEA setup on OS X

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

like image 793
James Allman Avatar asked Jan 22 '09 21:01

James Allman


People also ask

Does IntelliJ IDEA work on Mac?

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.

How do I open IntelliJ on Mac?

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.

Where is IntelliJ installed on Mac?

macOS: ~/Library/Application Support/JetBrains/Toolbox/apps.


2 Answers

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

like image 111
Rohan Avatar answered Sep 29 '22 11:09

Rohan


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.

like image 26
Stefan Arentz Avatar answered Sep 29 '22 09:09

Stefan Arentz