[2124] in java-interest
Re: class loaders
daemon@ATHENA.MIT.EDU (Arthur van Hoff)
Mon Sep 25 21:55:13 1995
Date: Mon, 25 Sep 1995 16:41:49 -0800 (PDT)
From: Arthur van Hoff <Arthur.Vanhoff@Eng.Sun.COM>
Reply-To: Arthur van Hoff <Arthur.Vanhoff@Eng.Sun.COM>
To: Jonathan Payne <jpayne@starwave.com>
Cc: java-interest@java.Eng.Sun.COM
Hi Jon,
> Can I define my own class loader which loads classes from the file
> system?
In a normal Java program yes, but not from an applet.
> If I do, will I be subject to the security measures which are
> in place for WWWClassLoader, which loads classes from the network?
Yes.
> Or are the security measures dependent on that particular class loader
> subclass?
You can't do it from an applet so this is not really an issue.
> Also, if my class loader periodically checks the file system for an
> update to that class, and reloads that class, will the system actually
> successfully start using the new definition of the class. Something
> tells me that it will actually continue to use the original
> definition, because the class is actually stored internally in the
> interpreter.
The next time that the class is loaded from that class loader it will
return the new class. The old class will eventually be gc'd (although
that isn't implemented). Existing instances of the new class will not
automatically be upgraded.
Have fun,
Arthur van Hoff
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com