IntelliJ IDEA 11.1 Web Help

9.0+
Some features described here are available in Ultimate edition only.

When running or debugging a Java EE application, you can modify the source code and, almost immediately, see the result of your changes.

Basically, for the changes to take effect, there is no need to restart the application server. This feature is generally known as hot application deployment.

Note

The time taken to update a running application depends, first of all, on the type of the application artifact you are working with.

The updates are nearly instantaneous for exploded artifacts, when the application exists in the form of an (unpacked) directory structure. For this type of artifacts, resources (HTML, JSP, JavaScript, and image files) are updated practically in no time. A bit more time is needed to update classes (EJBs, servlets, etc.).

Packed artifacts (WARs, EARs, JARs, etc.) need a lot more time to be updated.

When updating a running application, you can specify what should be updated and how. This may be done:

The update options are different for exploded and packed artifacts.

For exploded artifacts, the available options are:

For packed artifacts, the available options are:

All the options with the exception of the Restart server are the examples of hot application deployment.

Note

Depending on the application server, some of the update options listed above may be unavailable.

The application updates may be initiated in the following ways:

The Update on frame deactivation option may be changed by editing the active run/debug configuration. You can also turn the corresponding update option on and off in the Run or Debug tool window (update_resources_on_frame_deactivation_icon).

Specifying the application update options in the run/debug configuration
  1. While your application is running, open the run/debug configuration being used.
  2. On the Server tab of the Run/Debug Configurations dialog, specify the application update settings:
    • Perform on 'Update' action. Select the required update option from the list.
    • Show dialog. Select this check box to be able to see and change the current update option in the Update <application name> dialog. This dialog will be shown prior to actually updating the running application.
    • On frame deactivation. Select the necessary update option from the list. (If no update actions are required, select Do nothing.)
  3. Click OK in the Run/Debug Configurations dialog.
  4. Now to update the running application, do one of the following:
    • Click Update <application name> application update_icon on the toolbar of the Run or Debug tool window.
    • On the main menu, choose Run | Update <application name> application.
    • Press Ctrl+F10Command F10.

    Note

    If you switch from IntelliJ IDEA to a different application, the update option you have selected in the On frame deactivation list will be used.

Specifying the application update options in the run or debug tool window
  1. While your application is running, do one of the following:
    • Click Update <application name> application update_icon on the toolbar of the Run or Debug tool window.
    • On the main menu, choose Run | Update <application name> application.
    • Press Ctrl+F10Command F10.
  2. In the Update <application name> dialog that opens, select the necessary update option. Additionally, if you don't want to see this dialog when updating your application, select the Don't ask again check box. Click OK.

    Note

    • If the Update <application name> dialog is not shown, you can enable it by turning on the Show dialog option in the current run/debug configuration.
    • If you select a different update option in the Update <application name> dialog, the current run/debug configuration will be changed accordingly.
Turning the update on frame deactivation option on or off in the run or debug tool window
  • While your application is running, click update_resources_on_frame_deactivation_icon on the toolbar of the Deployment tab.

    Note

    If you open the active run/debug configuration for editing, you'll see that the On frame deactivation setting has changed accordingly.

See Also

Concepts:

Procedures:

Reference:

Web Resources: