Why does heap space run out only when running JUnit tests?
问题 When running JUnit tests, I always seem to run into this error: eclipse outOfMemoryError: heap space I have monitored Eclipse with JConsole and heap memory peaks at about 150MB. I have set heap memory to 1GB. I am using the following arguments when starting Eclipse: -vm "C:\Program Files\Java\jre1.5.0_08\bin\javaw.exe" -vmargs -Xmx1024M -XX:MaxPermSize=128M -Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false Does