Reputation: 34016
I have several launch configurations in Eclipse each launching the same Java program but with different parameters.
Now is it possible to run all of these at once (with one mouse click) instead of selecting each of it separately and launching it?
Upvotes: 53
Views: 34786
Reputation: 3498
EDIT: According to this answer since Eclipse Oxygen (4.7.0) you can use a run configuration of the type Launch Group for that.
Just install "C/C++ Development Tools" from the CDT (see eclipse.org/cdt/downloads.php ) - this single package is enough, no other CDT packages are needed. This won't disturb your Java environment ;-) Then you have "Launch Groups", for any kind of project, including Java projects. See the following screenshot:
You can run or debug the projects (also mixed mode), define delay times and so on. Have fun!
Upvotes: 49
Reputation: 4877
I found this post on the Eclipse trackers: Start multiple debug configurations at once
While it talks about multi-launching debug configurations, I think it is just as applicable to run configurations.
You may want to right click a run configuration in group launch and configure it.
Upvotes: 42
Reputation: 34145
Since Eclipse Oxygen (4.7.0) you can use a run configuration of the type Launch Group for that.
This short video shows how to use a Launch Group.
Upvotes: 12
Reputation: 53
You don't need any plugin:
Upvotes: -4
Reputation: 14920
There are two more options listed in Launch an Eclipse Run Configuration from ANT.
You could group them in Ant and then call them using Ant4Eclipse. Or call multiple launch configs from a command script using eclipse remote control.
Upvotes: 0
Reputation: 508
You can create a separate class that calls your program with different arguments, and run it instead.
public class YourClass {
public static void main(String arg){
System.out.println(arg);
}
}
public class YourClassTester {
public static void main(String[] args){
YourClass.main("SomeArg1");
YourClass.main("SomeArg2");
YourClass.main("SomeArg3");
}
}
Upvotes: -1