How to increase memory: Java heap space error

I'm running IntelliJ 12.1.2 with Maven and am trying to use the Parameterized.class from Junit 4.11 to read in a .csv file containing 500 records and perform tests on each parameter (parameter is simply a relative url onto which I append a base url).  I am getting a java.lang.OutOfMemoryError: Java heap space error.

I beleive I have already increased the memory size in

and also Maven runner to max sizes but still no joy.

Can anyone post the recommended / optimal solution for IntelliJ 12?

Please note I am a beginner, so I don't know if what I am trying is already going to ask too much of resources.
1 comment
Comment actions Permalink

First of all - you shouldn't modify Info.plist. If you want to alter VM parameters for IDEA, there's a dedicated file for that: IntelliJ Besides, those options don't work for Maven runner and Run/Debug configurations.
Next thing - Maven runner and Run/Debug configurations don't share VM options.
If you are running JUnit tests as a part of Maven build you have to configure surefire plugin like this:



If you are running the tests directly from Run/Debug you need to add -Xmx to VM options in respective configuration like this:
Screen Shot 2013-08-20 at 18.26.07 .png


Please sign in to leave a comment.