# How to run your program in IntelliJ

Running your program inside of IntelliJ is a fairly trivial process. We can do so via the run configuration system. First step is to actually create a configuration, which can be done by clicking the `ADD CONFIGURATION` button in the top right corner of your IDE.

![](https://1503668462-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ljf9VkKWF5KoqzthgPH%2F-MY0EyGi_oX1Pku7W90K%2F-MY0FH_fChgSnYAIviyd%2Fimage.png?alt=media\&token=6dc319a6-31d5-4e71-bd55-c9fcff570576)

Upon clicking this, a modal will open where you can create a new configuration from a template. Specifically, we want to create a "JAR Application" configuration, so that's the template we'll use. Click the + in the top left of the modal, then scroll down to JAR Application and click it.

![](https://1503668462-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ljf9VkKWF5KoqzthgPH%2F-MY0EyGi_oX1Pku7W90K%2F-MY0FeMmjUnwtk-6zli1%2Fimage.png?alt=media\&token=adc087b4-379c-4859-83aa-a3b49b404531)

Call it whatever you want, for the purpose of this tutorial, I'll simply be naming mine "run". Set the path to jar to where ever your jar is. I personally run the jar inside it's build folder, and for gradle, that's build/libs. So for this project, I'd be setting the path to jar to `/media/piggy/HDD/Documents/Github/hotswapdemo/build/libs/hotswapdemo-1.0.0-all.jar`.

You'll usually want the working directory to be the same as the directory the jar is in, however this isn't a strict requirement. Things can just get a bit funky if you don't do this.

Finally, you'll want to fill out any other options required for your application (such as vm options & program arguments), and then set the JRE. Hit apply & ok in the bottom right when you're finished.

You can run the program via shift + f10, or by clicking the play button in the top right.
