O'Reilly logo
  • William Yeh thinks this is interesting:

JDK 1.4 introduced a better mechanism that lets you make a change to a class, but lets all existing instance members retain their previous values. No static initializers or instance initializers are run, and static variables retain their values.

This mechanism, known as HotSwap or class redefinition, lets you fix a problem in a class, recompile it, dynamically replace the old instance with the new one, and then continue debugging with the fixed code, all without losing a step. The key point here is that you can make a fix within a debugging session and have it take effect without restarting the session.

This functionality is par...


Cover of Tomcat 6 Developer's Guide


HotSwap since JDK 1.4