Default VM Parameters For All Run Configurations

Hi there,

Does anyone out there know if you can set default VM parameters, to be used with all run configurations (even the temporary ones created by right clicking). I have a set of standard VM parameters that I always want (eg -ea and a bunch of -D settings) and then want to extend these on a per configuration basis.

Eclipse does this neatly using VM parameters that are set as part of the JRE configuration (and are then extended by individual run configurations). Idea seems to be missing this (at least I can't find the equivalent functionality anywhere) and it makes the IDE a real pain because you can't simply right-click a test/main class and run it. Instead you have to right click and run, ignore what happens (because, for example, assertions are disabled), edit the run configuration (to put in the default options such as -ea) and then finally run again. Surely I can't be the only one out there who finds this a real pain?

Apologies if I missed something obvious in the GUI and thanks in advance for any help on this problem.

Cheers,

Tich

3 comments
Comment actions Permalink

PS I spotted the "Edit Defaults" button at the bottom of the run configuration dialog. This isn't quite what is needed as it sets up defaults that are copied into configurations when they are created. If you want to then change the default VM arguments you would have to edit all your existing configurations. You also have to duplicate the VM parameters across all run configuration types which is less than ideal if all you really want are truly global VM parameter defaults.

0
Comment actions Permalink

You can do it only for all run configurations (including temporary ones) within the same project. For this you have to edit the default run configuration settings (Run -> Edit Configurations -> Edit Defaults). But as I said you have to do it once for every project.

0
Comment actions Permalink

It's not fair to answer your own question while I'm still typing... :)

0

Please sign in to leave a comment.