Install IntelliJ IDEA on Mac

From Bonus Bits
Jump to: navigation, search

Purpose

This article gives the steps to install Jetbrains IntelliJ IDEA on macOS.


Optional

IntelliJ IDEA now comes with openJDK bundled.


Install

  1. Download
    1. http://www.jetbrains.com/idea/
  2. Run installer


User File Paths

Configuration Path

~/Library/Preferences/<PRODUCT><VERSION>

Caches

~/Library/Caches/<PRODUCT><VERSION>

Plugins

~/Library/Application Support/<PRODUCT><VERSION>

Logs

~/Library/Logs/<PRODUCT><VERSION>


Configure Memory

If you're like me you may have several projects open simultaneously and find IntelliJ will use up the default 512-768 and crash. You can change the memory settings from the CLI.

  1. Copy the default rubymine.vmoptions file to your personal Preferences directory. Do not edit the files in the application, it will violate the application signature.
    sudo cp /Applications/IntelliJ\ IDEA.app//Contents/bin/idea.vmoptions ~/Library/Preferences/IntelliJIdea2016.3/
    
  2. Change Ownership of ridea.vmoptions file
    sudo chown username:staff ~/Library/Preferences/IntelliJIdea2016.3/idea.vmoptions
    
  3. Edit the idea.vmoptions file
    vim ~/Library/Preferences/IntelliJIdea2016.3/idea.vmoptions
    
  4. Change the Xmx value to what you want.
    1. 1 or 2 GB should be good, but to really know I recommend enabling Show memory indicator in settings to see how much memory you're actually using.
  5. Restart IntelliJ Idea

Example

-Xms128m
-Xmx2048m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops


Force IntelliJ to Use JDK

If you want the IDE to run a specific (maybe newer) installed JDK instead of it's bundled version. This is usually not necessary.

  1. Create a idea.jdk file in your app preferences folder
    vim ~/Library/Preferences/IntelliJIdea2016.3/idea.jdk
    
  2. Add path to JDK
    /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk
    
  3. Write and Quit
    :wq
    
  4. Restart IntelliJ


Sources