diff options
Diffstat (limited to 'tutorial')
-rw-r--r-- | tutorial/tutorial.html | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/tutorial/tutorial.html b/tutorial/tutorial.html index 709d2148..4670424e 100644 --- a/tutorial/tutorial.html +++ b/tutorial/tutorial.html @@ -584,7 +584,8 @@ Once a class loader loads a class, it cannot reload a modified version of that class during runtime. Thus, you cannot alter the definition of a class after the JVM loads it. However, the JPDA (Java Platform Debugger Architecture) provides -limited ability for reloading a class. See "HotSwap" of JPDA for details. +limited ability for reloading a class. +See <a href="#hotswap">Section 3.6</a>. </ul> <p>If the same class file is loaded by two distinct class loaders, @@ -999,6 +1000,24 @@ binary code license.</i> <p><br> +<a name="hotswap"> +<h3>3.6 Reloading a class at runtime</h3></a> + +<p>If the JVM is launched with the JPDA (Java Platform Debugger +Architecture) enabled, a class is dynamically reloadable. After the +JVM loads a class, the old version of the class definition can be +unloaded and a new one can be reloaded again. That is, the definition +of that class can be dynamically modified during runtime. However, +the new class definition must be somewhat compatible to the old one. +<em>The JVM does not allow schema changes between the two versions.</em> +They have the same set of methods and fields. + +<p>Javassist provides a convenient class for reloading a class at runtime. +For more information, see the API documentation of +<code>javassist.tool.HotSwapper</code>. + +<p><br> + <a href="tutorial2.html">Next page</a> <hr> |