一次运行多个启动配置
我在 Eclipse 中有多个启动配置,每个配置启动相同的 Java 程序,但参数不同。
现在是否可以一次运行所有这些(只需单击一下鼠标),而不是单独选择每个并启动它?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
编辑:根据这个答案,自 Eclipse Oxygen (4.7.0) 以来,您可以使用运行类型启动组的配置。
只需从 CDT 安装“C/C++ 开发工具”(请参阅 eclipse.org/cdt/downloads.php ) - 这个单个包就足够了,不需要其他 CDT 包。这不会干扰您的 Java 环境;-) 然后您将拥有“启动组”,适用于任何类型的项目,包括 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:
You can run or debug the projects (also mixed mode), define delay times and so on. Have fun!
我在 Eclipse 跟踪器上找到了这篇文章: Start multiple debugconfiguration at Once
虽然它讨论了多启动调试配置,但我认为它同样适用于运行配置。
您可能需要右键单击组启动中的运行配置并对其进行配置。
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.
自 Eclipse Oxygen (4.7.0) 起,您可以使用 启动组 类型的运行配置。
这段简短视频展示了如何使用启动组 .
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.
从 ANT 启动 Eclipse 运行配置中列出了另外两个选项。
您可以在 Ant 中将它们分组,然后使用 Ant4Eclipse 调用它们。或者使用 eclipse 远程控制 从命令脚本调用多个启动配置。
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.
您可以创建一个单独的类,使用不同的参数调用您的程序,然后运行它。
You can create a separate class that calls your program with different arguments, and run it instead.
您不需要任何插件:
You don't need any plugin: