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:
-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.
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.