views:

82

answers:

3

hello, i have a 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 mouseclick) instead of selecting each of it seperately and launching it?

thanks!

+1  A: 

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");
    }
}
dpatch
+4  A: 

found this on the eclipse trackers. while it talks about multi-launching debug configurations, i think it is just as applicable to run configurations.

anirvan
yep that would be exactly what i need. do you know how to pull this launch group thing out of the CDT and into java eclipse?
clamp