Running multiple launch configurations at once

JavaEclipseRun Configuration

Java Problem Overview


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?

Java Solutions


Solution 1 - Java

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:

enter image description here

You can run or debug the projects (also mixed mode), define delay times and so on. Have fun!

Solution 2 - Java

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.

Launch Group

You may want to right click a run configuration in group launch and configure it.

Launch sequential

Solution 3 - Java

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.

Solution 4 - Java

There are two more options listed in https://stackoverflow.com/questions/3045566/launch-an-eclipse-run-configuration-from-ant.

You could group them in Ant and then call them using http://www.ant4eclipse.org/">Ant4Eclipse</a>;. Or call multiple launch configs from a command script using eclipse remote control.

Solution 5 - Java

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");
    }
}

Solution 6 - Java

You don't need any plugin:

  1. Create all Run Configurations in eclipse
  2. Select Organize Favorites...
  3. Add you favorites, done

Screenshot

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionclampView Question on Stackoverflow
Solution 1 - JavaAndiView Answer on Stackoverflow
Solution 2 - JavaanirvanView Answer on Stackoverflow
Solution 3 - JavahowlgerView Answer on Stackoverflow
Solution 4 - JavastudgeekView Answer on Stackoverflow
Solution 5 - JavadpatcheryView Answer on Stackoverflow
Solution 6 - JavaRyanView Answer on Stackoverflow