After installing Intellij IDEA Selena (EAP release) Mac OS X .dmg, I found that I couldn’t edit the vm memory heap options like I used to on Linux. I inspected the /Applications/Selena-7027.app/bin/idea.sh file and saw that it looks for a file in that same directory called idea.vmoptions.

So, I created the file, added my vm options (primarily -Xms64m -Xmx512m), saved it and restarted Selena. Unfortunately my settings weren’t picked up.

But I found the solution after a little googling, but decided to document it clearly here for the benefit of others.

On Mac OS X, the program is started with the configuration found in /Applications/Selena-7072.app/Contents/Info.plist

Open up that file and go all the way to the bottom and find the section that looks like this:

VMOptions
-Xms64m -Xmx512m -XX:MaxPermSize=128m -Xbootclasspath/p:../lib/boot.jar -ea -agentlib:yjpagent

You’ll notice that I already changed the options to my preferred settings. You can edit as necessary. Save the file and then restart Idea.

Bonus setting:

Set the EXE4J_JAVA_HOME environment variable to point to $JAVA_HOME (assuming you have JDK 1.5 or 1.6 installed). Idea will now start up with your local JDK installation instead of the one bundled with Idea. If JAVA_HOME points to a 1.6 JDK, you’ll see BIG performance improvements due to the improvements in the JDK 1.6 VM Ergonomics.

 

8 Responses to IntelliJ IDEA on Mac OS X – Setting Java VM options

  1. Mac Tips and Tricks

    See also Mac Apps Where to look stuff up macosxhints.com

  2. Guy Gascoigne says:

    Just a note to say thanks for posting this, as a relative mac noob, this saved me a ton of hunting around.

  3. Cuonglm says:

    Thank you very much!

  4. bharath says:

    Thanks I could do it

  5. will says:

    Thanks a lot for this. It appears that many other apps use this same convention. Maybe it is a Mac OS X standard? Anyhow thanks.. my application now can start up.

  6. Willem says:

    Thanks for posting this, helped me out.

  7. firas says:

    thank you for sharing and not being selfish – Good Work

  8. Arun Batchu says:

    Thanks a lot. Helped a lot.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>