IntelliJ IDEA 2016.2 Help

Reloading Classes

On this page:

Introduction

You can reload classes changed during debugging without need to restart the entire application using the HotSwap mechanism.

At the moment due to original limitations of Java SDK the HotSwapping is possible ONLY if a method body is altered. In all other cases (like changing method or class signature), the class reload is impossible and the corresponding error message appears.

Reloading changed classes

To reload changed classes

  1. Do one of the following:
    • On the main menu, choose Run | Reload Changed Classes.
    • On the main menu, choose Build | Compile "class_name" to recompile an altered class during debug.
  2. In the Reload Changed Classes dialog box, confirm reloading. Results are displayed in the Messages tool window.

Configuring reloading behavior

To configure reloading behavior

  1. On the main menu, choose File | Settings , and under Build, Execution, Deployment expand the Debugger node.
  2. Open HotSwap page.
  3. Click one of the radio buttons in the group Reload classes after compilation. You can opt to always reload classes, reload after confirmation, or never do it.

See Also

Last modified: 5 September 2016