只需按一下按钮就可以在IntelliJ中运行多个应用程序吗? [英] Is it possible to run multiple applications in IntelliJ with just one press of a button?

查看:70
本文介绍了只需按一下按钮就可以在IntelliJ中运行多个应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这并不是一个大问题,但是我想让我的生活更轻松一些.有没有一种方法只需按一下按钮即可运行多个应用程序?说,我有appA,appB和AppC,(它们全都在Java中)有没有办法让他们只需按一下就可以按顺序运行所有3个?点击运行"按钮来进行类似10个应用程序的操作有点乏味.我假设脚本还是插件?我不太确定如何表达我的困境. :D

It's not really a big problem, but I'd like to make my life a bit easier. Is there a way to run multiple applications with just one press of a button? Say, I have appA, appB, and AppC, (they're all in java) is there a way that they could run all 3 in some order with just one press? It's kinda tedious hitting the "run" button for like 10 applications. I'm assuming a script or maybe plugin? I'm not too sure how to phrase my dilemma. :D

但是,如果您不知道答案,那就可以了. :(

But if you don't know the answer, it's ok. :(

我为自己的懒惰感到非常as愧...但这会使我的手受到的伤害更少.

I feel extremely ashamed for my laziness... but it will make my hands hurt less.

推荐答案

我认为从版本15开始就可以实现.您只需创建类型为复合"的运行/调试配置,然后选择要运行的配置,所以:

I think this has been possible since version 15. You simply create a Run/Debug Configuration of type 'Compound', and select the configurations you want to run, so:

  1. 确保您之前已经为要运行的各种应用程序(或其他运行配置)设置了运行配置.
  2. 点击运行"菜单
  3. 点击编辑配置"
  4. 点击绿色的"+"图标(在窗口的左上方)
  5. 点击复合"
  6. 在右侧窗格中,为您的组输入一个有意义的名称,然后单击绿色的"+"图标(右侧窗格中的那个,而不是窗口的左上角)
  7. 选择一种运行配置
  8. 对于要一次单击运行的所有配置重复5和6
  9. 点击确定
  10. 在菜单栏的下拉菜单中选择新创建的化合物配置
  11. 点击运行按钮(请注意,您似乎无法在调试模式下启动所有应用程序,如果要执行此操作,则需要单独进行操作)
  12. 观看所有应用程序的启动过程,一一对应.陶醉于您新发现的空闲时间
  1. Ensure you have previously set up run configurations for the various applications (or other run configurations) that you want to run.
  2. Click on the 'Run' menu
  3. Click 'Edit Configurations'
  4. Click the green '+' icon (top-left of the window)
  5. Click 'Compound'
  6. In the right-hand pane, enter a meaningful name for your group, then click the green '+' icon (the one in the right-hand pane, not the top-left of the window)
  7. Select one of the run configurations
  8. Repeat 5 and 6 for all the configurations you want to run in a single click
  9. Hit OK
  10. Select your newly-created compound configuration in the drop-down in the menu bar
  11. Hit the run button (note that you don't appear to be able start all the applications in debug mode, if you want to do that, you'll need to do so individually)
  12. Watch all your applications start, one-by-one. Revel in your newly discovered free time

2个缺点:

  1. 正如CashIsClay在下面指出的那样,您无法明确更改配置的运行顺序;它们以字母顺序运行.我不确定这是一个很大的限制,但是我希望我的应用程序能够以任何顺序启动,以实现生产环境中的弹性.当然,一个不可怕的解决方法是为您的运行配置命名,例如:'1. Foo'; '2. Bar",如果这对于Foo在Bar开始之前运行至关重要.
  2. 您只能在运行"模式下启动,而不能在调试"模式下启动.我还没有尝试过MultiRun插件,但是如果您始终以调试模式启动所有内容,那可能是更好的选择.

这篇关于只需按一下按钮就可以在IntelliJ中运行多个应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆