~ read.

Increasing IDE memory limit in IntelliJ IDEA on Mac

The time has come - at some point 700 Mb of RAM was not enough for one of Java projects i was working on and i decided to increase Java heap size memory to fix that. In older version of IDEA you would probably modify Info.plist file and put there -Xms128m -Xmx2048m for memory increasion.

But since IDEA 12, IDE become a signed application, therefore changing options in Info.plist is no longer recommended, as the signature will not match and you will get issues depending on your system security settings (app will either not run, or firewall will complain on every start, or the app will not be able to use the system keystore to save passwords).

So, as a fix for IDEA-94050 issue, a new way of defining IDEA JVM options was provided. :

Now it can take VM options from ~/Library/Preferences/<appFolder>/idea.vmoptions and system properties from ~/Library/Preferences/<appFolder>/idea.properties.

For example, to use -Xmx2048m option you should copy the original .vmoptions file from /Applications/IntelliJ\ IDEA.app/bin/idea.vmoptions to ~/Library/Preferences/IntelliJIdea12/idea.vmoptions, then modify the -Xmx setting.

The final file should look like:

-Xms128m
-Xmx2048m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=64m
-XX:+UseCodeCacheFlushing
-XX:+UseCompressedOops

Copying the original file is important, as options are not added, they are replaced.

This way your custom options will be preserved between updates and application files will remain unmodified making signature checker happy.

This solution was found here

comments powered by Disqus
comments powered by Disqus