Working with Run launch configurations

About this task

Run launch configurations allow you to specify and save the information required to run your application. You can reuse them to for subsequent run actions. You can also create multiple launch configurations for the same application. The advantage of creating more than one launch configuration for the same application is that you can set different arguments as parameters to the program in the launch configurations window.

You can use the Run Launch Configurations window to create, remove, edit and duplicate launch configurations.

To open the Run Launch Configurations window:
  • From the workbench menu, select Run > Run. Or, select Run. from the down arrow next to the Run push button .
To create a new run launch configuration:
  1. In the Run Launch Configurations window, four launch configuration types exist for IBM® i Run:
    • IBM i: Run Batch Application
    • IBM i: Run Interactive Application
    • IBM i: Run Application in RSE Job
    • IBM i: Run Multi-threaded Application
  2. Select the IBM i Run configuration type that you want to use and click New. The launch configuration tabs and entry fields will display on the right-hand side of the Run Launch Configurations window.
  3. Enter a name for your new configuration.
  4. In the How To Start tab, specify the connection you want to use for this configuration, or select one from the drop-down list. Or, right-click it, and select New to define a new connection.
  5. In the Command to start application area, enter the command you want to use to run your application and any required parameters. You can also use Prompt to enter parameters for the command. If there is a selected program or command object in the Remote Systems view or Object Table view, the name of the selected object is pre-filled in the command string area.
  6. (Optional) Click the Common tab to define additional properties for the configuration:
    • Select whether you want this configuration to be local to your workbench instance, or shared with your team.
    • From the Run mode drop-down list, specify a perspective to switch to when the command is launched, or leave the default value if you want the perspective to remain the same.
  7. Click Run to start your application. (If you want to create a launch configuration without running your application right away, follow the steps above but click Apply instead of Run.)

Duplicating launch configurations

You can also create new launch configurations by copying existing launch configurations:
  • In the Run Launch Configurations window, right-click the launch configuration that you want to copy. You might need to expand the launch configuration type node to find the launch configuration you want to copy.
  • Select Duplicate from the pop-up menu.
  • The duplicate launch configuration appears beneath the original launch configuration (with (<number>) appended to the launch configuration name). The duplicate's settings are the same as the original launch configuration, and they appear on the right-hand side of the Run Launch Configurations window. Alter the settings as desired for your new launch configuration.
  • If all information mandatory to the launch configuration has been provided, the Run and Apply push buttons will be enabled and the new launch configuration will be saved.
You can also use the pop-up menu to remove or edit existing configurations.

Run with an existing launch configuration via the launch history

The launch history is a list of the most recent run launches. In the workbench, the launch history appears when you select the down arrow next to the Run push button in the workbench toolbar or when you choose Run > Run History from the workbench menu.

You can modify the launch history in the workbench preferences. From the workbench menu, click Window > Preferences. the Preferences window, select Debug > Launch History to open the Launch History page. In this page, you can set the maximum number of launch configurations that will appear in the launch history, and you can add and remove configurations from the list.

Relaunching

To run the launch configuration that was last used, do one of the following:
  • Select Run > Run Last Launched from the workbench menu.
  • Select Run Last Launched from the workbench toolbar Run push button .
  • Press Ctrl+F11.

Feedback