Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse - passing VM parameter to every test in the project

Tags:

java

eclipse

I need to pass a VM parameter to every test that is run in the project. Setting this manually doesn't seem to be the most convenient solution, so is there any possibility to pass the parameter to every test automatically.

Thank you for help.

like image 752
Jarek Avatar asked Jul 15 '11 06:07

Jarek


People also ask

How do I pass a VM argument in Eclipse?

-- Go to the Eclipse Window > preferences, in "Java > Installed JREs". -- Copy the current default JRE with a new name, for example myJRE. -- Select the new JRE and click on the "Edit" button. -- In the "Edit JRE" dialog, add your JVM arguments in the "Default VM Arguments" field.


1 Answers

We change the JRE Configuration in Eclipse (Preferences>Java>Installed JREs). There you can set default VM Arguments which are used for anything you run with that JRE.

Now simply configure your project to use this JRE (Java Build Path) and you should be on the right way.

Edit JRE - Eclipse

like image 152
Daniel Avatar answered Oct 17 '22 23:10

Daniel