IntelliJ IDEA 11.1 Web Help

IntelliJ IDEA enables running entire applications as well as classes with the main() method.

When running an application, IntelliJ IDEA uses the settings defined in the Run/Debug Configuration dialog box. All run configurations that exist in a project, are available in the Select Run/Debug Configuration drop-down list on the main toolbar:

runConfigMenu
To run an application
  • On the main toolbar, select the desired run configuration, and do one of the following:
    • Choose Run | Run on the main menu.
    • Click runBuild.
    • Press Shift+F10Shift F10.

Note

If the options that enable build before launching were enabled, IntelliJ IDEA will run the build, and after successful build will run the application. Otherwise, the program will start immediately.

Tip

Alternatively, press Alt+Shift+F10Alt Shift F10, select the desired run configuration from the pop-up menu, and press EnterEnter.

altShiftF10

From this pop-up menu you can:

  • Invoke Edit Configuration dialog.
  • Edit the selected configuration before launch (F4F4).
  • Instantly delete a temporary configuration (DeleteDelete).
  • Switch from run to debug and vice versa (hold ShiftShift).
  • Access a previously selected configuration (11).
  • Access context-dependent configuration (22 or 33).

This pop-up menu can also be quickly accessed by pressing F9F9, when you're not running any debug session.

To run a class with main()method, do one of the following
  • Open the class in the editor and choose Run <method name > on the context menu or press Ctrl+Shift+F10Control Shift F10.
  • Select the class in the Project tool window and choose Run <method name > on the context menu of the selection.

See Also

Concepts:

Procedures:

Reference:

Web Resources: