Run jar configuration in IntelliJ IDEA

前端 未结 1 535
死守一世寂寞
死守一世寂寞 2021-02-06 00:03

Is there any option in IntelliJ IDEA to create a configuration to run an external jar like the external tools configurations in Eclipse?

1条回答
  •  一整个雨季
    2021-02-06 00:19

    IDEA does not have a dedicated "Executable JAR" run/debug configuration. It does sound like a nice new feature. I'd recommend you request it: http://youtrack.jetbrains.com

    Despite that, there are two options to run an executable JAR.

    OPTION 1

    You can define a normal application run/debug configuration and define the executable JAR via the VM options. Here's an example: enter image description here

    OPTION 2

    You can create an "External Tool" definition via File > Settings > [IDE Settings] > External Tools. (Click the Help button in the dialog for details on the fields). You can run it via the Tools menu, or by assigning it a keyboard shortcut in the Keymap settings. The one downside here is that External Tools are defined at the IDE level and not a Project level. So that definition will show for all Projects. However, using the "Groups" option in the External Tools to group all configurations for a Project can add some structure.

    0 讨论(0)
提交回复
热议问题