I am running headless eclipse to execute JUnit tests
My command looks like this:
"C:\Program Files (x86)\Java\jdk1.6.0_45\jre\bin\java.exe"
-cp "C:\eclipse-jee-kepler-SR2-win32\eclipse\plugins\org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar"
org.eclipse.equinox.launcher.Main
-noupdate
-application org.eclipse.ant.core.antRunner
-data "C:\Users\US\.jenkins\workspace\XBTests\ecworkspace"
-buildfile "C:\Users\US\.jenkins\workspace\XBTests\testrunscripts\runtests.xml"
The tests are running as expected, and everything was going good.
Then one day I got
java.lang.OutOfMemoryError: Java heap space
My question is that to increase memory, in the command above, I should add:
-vmargs -Xmx1024M
-Xmx1024M
Verified that passing -vmargs -Xmx1024M
will not increase memory of the executed java.exe.
Removing -vmargs
resolved the OutOfMemoryError problem.
Hence answer to my question is 2.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.