From 9b1411e58b65a464f1d92ba1dbdbf00494ca9ffd Mon Sep 17 00:00:00 2001 From: chiba Date: Fri, 24 Jun 2005 09:35:11 +0000 Subject: updates comments git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@186 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- tutorial/tutorial.html | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'tutorial') 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 Section 3.6.

If the same class file is loaded by two distinct class loaders, @@ -999,6 +1000,24 @@ binary code license.


+ +

3.6 Reloading a class at runtime

+ +

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. +The JVM does not allow schema changes between the two versions. +They have the same set of methods and fields. + +

Javassist provides a convenient class for reloading a class at runtime. +For more information, see the API documentation of +javassist.tool.HotSwapper. + +


+ Next page


-- cgit v1.2.3