Hi,

Please excuse me for the lack of knowledge obvious in this question; I
haven't ever worked with the JVM source.  Also, I suppose this applies to
all JVMs, but I'm interested in the Linux implementation, because, really,
what else is there? :)

What I would like to know is this: how difficult would it be to reload the
definition of a class if objects of the class had already been
instantiated, then destroyed and garbage-collected?  As an example, say
I'm testing one small component of a large system, and I need to make
changes to the small component's class file.  Let's say I'm able to make
sure that all references to objects of that class have been destroyed and
garbage collected.  For simplicity let's also say that there are no
subclasses of the class.  How difficult would it be to allow the JVM to
dump its current definition of the class and reload it from the class
file, given that the class file may have changed since the JVM was
started.

java.lang.ClassLoader caches Class objects so that class files don't have
to be loaded or resolved more than once.  While it would be easy enough to
tweak ClassLoader to not do this caching, or to do it more controllably, I
have a feeling the JVM might not like that very much.

Thanks,
dstn.



-----------------------------------------------
--  Dustin Lang, [EMAIL PROTECTED]  --
(java developer, linux guy, green-haired freak)

Why Linux is so cool: /usr/include/string.h:190:
/* Sautee STRING briskly.  */
extern char *strfry __P ((char *__string));
-----------------------------------------------



----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to