Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run jar configuration in IntelliJ IDEA

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

like image 431
Ivan Fernandez Avatar asked Nov 07 '13 16:11

Ivan Fernandez


1 Answers

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.

like image 142
Javaru Avatar answered Oct 03 '22 20:10

Javaru