IntelliJ IDEA 13.1.0 Web Help

IntelliJ IDEA enables running entire applications as well as classes with a 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:

img

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 img.
    • Press Shift+F10Shift+F10Shift+F10Shift+F10Shift+F10F9Ctrl+F5F6Shift+Alt+X or Shift+F10Control RShift F10Shift Command F11.

Note

If the options that launch build before running 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 Shift+Alt+F10Shift+Alt+F10Shift+Alt+F10Shift+Alt+F10Shift+Alt+F10Shift+Alt+F10Shift+Alt+F10Shift+Alt+F10Shift+Alt+F10Control Alt RShift Alt F10Control Alt R, select the desired run configuration from the pop-up menu, and press EnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnterEnter.

altShiftF10

From this pop-up menu you can:

  • Invoke Edit Configuration dialog.
  • Edit the selected configuration before launch (F4F4F4F4F4F4F4F4F12 or Ctrl+Shift+ECommand Down or F4F4F3).
  • Instantly delete a temporary configuration (DeleteDeleteDeleteDeleteDelete or Ctrl+DDeleteDeleteDeleteDeleteDelete, Backspace or Command BackspaceDelete, Backspace or Command BackspaceDelete, Backspace or Command Backspace).
  • Switch from run to debug and vice versa (hold Shift).
  • Access a previously selected configuration (1).
  • Access context-dependent configuration (2 or 3).

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

To run a class with a 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+F10Ctrl+Shift+F10Ctrl+Shift+F10Ctrl+Shift+F10Ctrl+Shift+F10Ctrl+Shift+F10Ctrl+F9Shift+Alt+F6 or Shift+F6Ctrl+Shift+F10Control Shift RControl Shift F10Control Shift R.
  • 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: