What is the correct way to set the JVM parameter in eclipse

I am using eclipse 4.2 to run a junit test. the test uses a lot of memory, so I want to increase the memory allocated by jvm. I wanted to know if there is a difference between setting the heap memory parameter in the in-eclipse file and the launch configuration?

+5
source share
3 answers

Note the memory settings for Java processes running eclipse differ from the maximum memory size for the eclipse itself.

Accounting for the eclipse itself is set at startup

-vmargs -Xmx1024M -Xms1024M -XX:PermSize=2048m -XX:MaxPermSize=2048m

, m "mx" , m "1024M" ; single-X "=", double-X "=".

JVM, eclipse, , eclipse:

Window::Preferences::Java::Installed JREs::Edit::Default Vm Arguments: -Xms128M -Xmx2048M

( eclipse.)

+9

eclipse.ini, .

 -Xms1024m
 -Xmx1024m
 -XX:MaxPermSize=256m
+4

eclipse.ini, Eclipse - - Java, Eclipse.

Run Run, , Eclipse.

Since your unit test uses a lot of memory, it doesn't matter how much Eclipse memory is available. unit test will run in a new Java process with default memory allocation.

+2
source

All Articles