Reputation: 6450
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!
Upvotes: 15
Views: 9897
Reputation: 11535
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.
Upvotes: 27
Reputation: 26428
you can try in eclipse.ini file
http://wiki.eclipse.org/Eclipse.ini
Upvotes: 0