Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

increase IntelliJ java heap size

after a lot of research I could not get a result. I'm new to IntelliJ IDEA, I use 11.1.2 version. I work with 3 modules (3 eclipse projects) and in each of them I setted Preferences -> Compiler -> Java Compiler with the following values:

Maximum heap size (MB): 512

Additional command line parameters:

-target 1.6 -XX:MaxPermSize=512M -Xms256m -Xmx512m -XX:PermSize=512m

And also configured Maven runner's VM Options as the following:

-XX:PermSize=1024m -XX:MaxPermSize=512m -Dfile.encoding=UTF-8 -Duser.language=en

with skip tests checked...

I also changed Applications -> IntelliJ IDEA 12 -> Contents -> Info.plist:

      <key>VMOptions</key>
      <string>-ea -Xverify:none -Xbootclasspath/a:../lib/boot.jar</string>

      <key>VMOptions.i386</key>
      <string>-Xms256m -Xmx512m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=128m</string>

      <key>VMOptions.x86_64</key>
      <string>-Xms256m -Xmx512m -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=128m -XX:+UseCompressedOops</string>

      <key>WorkingDirectory</key>

But after doing these changes IntelliJ shows me 200-250 MB of heap space allocated on the bottom right... What is wrong?

like image 344
Zaur Guliyev Avatar asked Jul 14 '12 08:07

Zaur Guliyev


1 Answers

Adding -Xms512m -Xmx1024m settings to Maven runner configurations (not the one in Preferences but the one I created for my project) solved java heap space error for me.

like image 92
Zaur Guliyev Avatar answered Sep 20 '22 17:09

Zaur Guliyev