IntelliJ provides multiple ways to create configuration. This chapter discusses the options to create temporary, permanent configuration. It also discusses method to share configuration among other users.
Temporary configuration is created when you run or debug Java class or test case. Consider the following steps to understand how this works −
Temporary configuration can be converted to permanent configuration by saving it with IntelliJ. To save configuration, click on the Save Configuration option from the Run menu −
You can also modify the existing configuration by editing it.
In this section, we will understand how to create new configuration. Follow these steps to create new configuration −
Navigate to the Run → Edit Configuration.
Click on the Plus button to add new configuration.
Select Application from the dropdown list.
It will create un-named configuration.
Configure it according to your requirements and click on the OK button.
This saved configuration will be accessible from the Run menu along with other configurations.
Follow these steps to share configuration with others −
Navigate to the Run → Edit Configuration.
Select configuration from the left pane and click on the Share checkbox.
It will store configuration on disk.
If directory based format is used, it will save configuration in separate file under runConfiguration folder. Otherwise, it will store configuration in the .ipr file.
To run project with specific configuration −
Select configuration from the Run menu.
Run the project as shown in the following screenshot −