![]() To manage environment variables in a separate dialog with a table. You can override system variables as well as define your custom ones. If this option is disabled, attempting to re-run the application will terminate the active session.Įnvironment variables – specify the environment variables for the process as key-value pairs and separate them with semicolons, for example, HOME=/home/me.user MY_APP_DATA=/home/me.user/appdata. Similarly, you can remove unused options.Īllow multiple instances – select if you want to allow multiple instances of this program to run at the same time. When you select an item, it is added to the dialog. If you want to fine-tune the way your application should be launched, click Modify options to access more advanced run/debug configuration features. For fields that contain parameters with various paths and filenames, you can click to select from a list of available IDE macros. If an argument has spaces inside, enclose it in double quotes, for example: arg1 arg2 "long argument".įor fields that can get too long, you can click to expand the field. At runtime, they will be available as strings in the args array. Program arguments – the command-line arguments to be passed to your application. The main class must contain the public static void main(String args) method. Main class – the main class defines the entry point of your application. JDK or JRE – the JDK or JRE that will be used for running your program. To access the fields using keyboard, hold Alt and use the shortcut according to the hints that appear. ![]() In the Build and run section, specify the parameters listed below. This name will be shown in the list of the available run/debug configurations. Specify the run/debug configuration name in the Name field. The list shows the run/debug configuration templates. In the Run/Debug Configuration dialog, click on the toolbar or press Alt+Insert. Alternatively, press Alt+Shift+F10, then 0. For other templates, refer to List of run/debug configurations.įrom the main menu, select Run | Edit Configurations. This is the most common template for Java, which corresponds to compiling your program with javac and then running it with java. This procedure describes the steps to create a run/debug configuration using the Application template. Create a run/debug configuration from a template The list of available templates varies depending on the installed and enabled plugins. IntelliJ IDEA provides run/debug configuration templates for different languages, tools, and frameworks. Select a temporary configuration in the run/debug configuration switcher and then click Save Configuration.Īlternatively, select a temporary configuration in the Run/debug configurations dialog and click on the toolbar. Save a temporary configuration as permanent For the detailed description of the template, see List of run/debug configurations. Set up the run/debug configuration parameters. IntelliJ IDEA creates a permanent run/debug configuration of the corresponding type. Place the caret at the declaration of an executable method or class (for example a class with the main() method or a test suite) and press Alt+Enter. Save a temporary run/debug configuration as permanent.Ĭreate from a template or copy an existing configuration.Ĭreate a permanent run/debug configuration from an executable method or class When there is an executable class or method, you can create a permanent run/debug configuration right from the editor. ![]() IntelliJ IDEA provides the following ways to create a permanent run/debug configuration: Create permanent run/debug configurations If necessary, you can increase this limit in Settings | Advanced Settings | IDE | Temporary configurations limit. The older ones are automatically deleted when new ones are added. The maximum number of temporary configurations is 5. Permanent configurations have opaque icons while the icons of temporary configurations are semi-transparent. ![]() So whenever you run/debug or test your code, IntelliJ IDEA either uses an existing permanent run/debug configuration or creates a new temporary one. Permanent configurations remain as part of your project until you remove them. Permanent - created explicitly from a template or by saving a temporary configuration. It provides the bare minimum that allows a class with the main() method to run. ![]() Temporary - created every time you are running a class that does not have a permanent configuration. There are two types of run/debug configurations: Each configuration is a named set of startup properties that define what to execute and what parameters and environment should be used. IntelliJ IDEA uses run/debug configurations to run, debug, and test your code. ![]()
0 Comments
Leave a Reply. |