一次运行多个启动配置

时间:2021-06-29 15:39:16

I have several launch configurations in Eclipse each launching the same Java program but with different parameters.

我在Eclipse中有几个启动配置,每个启动相同的Java程序但具有不同的参数。

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?

现在可以一次运行所有这些(只需点击一下鼠标),而不是单独选择它们并启动它吗?

6 个解决方案

#1


20  

I found this post on the Eclipse trackers: Start multiple debug configurations at once

我在Eclipse跟踪器上发现了这篇文章:立即启动多个调试配置

While it talks about multi-launching debug configurations, I think it is just as applicable to run configurations.

虽然它讨论了多启动调试配置,但我认为它同样适用于运行配置。

#2


45  

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:

只需从CDT安装“C / C ++开发工具”(参见eclipse.org/cdt/downloads.php) - 这个单一包就足够了,不需要其他CDT包。这不会打扰您的Java环境;-)然后,对于任何类型的项目,包括Java项目,您都有“启动组”。请参阅以下屏幕截图:

一次运行多个启动配置

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

您可以运行或调试项目(也是混合模式),定义延迟时间等。玩的开心!

#3


8  

Since Eclipse Oxygen (4.7.0) you can use a run configuration of the type Launch Group for that.

从Eclipse Oxygen(4.7.0)开始,您可以使用Launch Group类型的运行配置。

This short video shows how to use a Launch Group.

这段简短的视频展示了如何使用Launch Group。

#4


0  

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

#5


0  

There are two more options listed in Launch an Eclipse Run Configuration from ANT.

从ANT启动Eclipse运行配置中列出了另外两个选项。

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.

您可以将它们分组到Ant中,然后使用Ant4Eclipse调用它们。或者使用eclipse远程控制从命令脚本调用多个启动配置。

#6


-4  

You don't need any plugin:

你不需要任何插件:

  1. Create all Run Configurations in eclipse
  2. 在eclipse中创建所有运行配置

  3. Select Organize Favorites...
  4. 选择整理收藏夹...

  5. Add you favorites, done
  6. 添加你的收藏,完成

一次运行多个启动配置

#1


20  

I found this post on the Eclipse trackers: Start multiple debug configurations at once

我在Eclipse跟踪器上发现了这篇文章:立即启动多个调试配置

While it talks about multi-launching debug configurations, I think it is just as applicable to run configurations.

虽然它讨论了多启动调试配置,但我认为它同样适用于运行配置。

#2


45  

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:

只需从CDT安装“C / C ++开发工具”(参见eclipse.org/cdt/downloads.php) - 这个单一包就足够了,不需要其他CDT包。这不会打扰您的Java环境;-)然后,对于任何类型的项目,包括Java项目,您都有“启动组”。请参阅以下屏幕截图:

一次运行多个启动配置

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

您可以运行或调试项目(也是混合模式),定义延迟时间等。玩的开心!

#3


8  

Since Eclipse Oxygen (4.7.0) you can use a run configuration of the type Launch Group for that.

从Eclipse Oxygen(4.7.0)开始,您可以使用Launch Group类型的运行配置。

This short video shows how to use a Launch Group.

这段简短的视频展示了如何使用Launch Group。

#4


0  

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

#5


0  

There are two more options listed in Launch an Eclipse Run Configuration from ANT.

从ANT启动Eclipse运行配置中列出了另外两个选项。

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.

您可以将它们分组到Ant中,然后使用Ant4Eclipse调用它们。或者使用eclipse远程控制从命令脚本调用多个启动配置。

#6


-4  

You don't need any plugin:

你不需要任何插件:

  1. Create all Run Configurations in eclipse
  2. 在eclipse中创建所有运行配置

  3. Select Organize Favorites...
  4. 选择整理收藏夹...

  5. Add you favorites, done
  6. 添加你的收藏,完成

一次运行多个启动配置