15

Anyone know how to get Eclipse to use a set of default VM args? I'm getting fed up of constantly having to specify these manually every time I run a specific package, class or method within my otherwise smoothly-running test suite.

Using JUnit 4, Eclipse 3.5.

Rationale: some tests are integration tests verifying operations with large input sets so it's tedious to have to keep putting in:

-Xms256m -Xmx512m

If there's something, e.g. in Eclipse prefs, where I can specify this once and for all I'd be very grateful!

2 Answers 2

27

If you run your tests in a separate JRE (the default, I think) then you can go to Installed JREs and specify default VM arguments for it there, as in the screenshot below (the orange buttons indicate what I clicked to access the dialog below it).

If you run your tests in the same JRE as the workspace, then the solution is to edit your eclipse.ini file and put the arguments there.

Screenshot of JRE VM arguments

2
  • Looks promising I'll give it a go
    – Brian
    Nov 22, 2010 at 16:45
  • 2
    Keep in mind that this would affect all run targets that use this JVM, e.g., things other than JUnit tests.
    – BeeOnRope
    Nov 3, 2016 at 1:01
0

you can try in eclipse.ini file

http://wiki.eclipse.org/Eclipse.ini

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.