470,833 Members | 1,956 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

Unloading a class

I need to be able to load different classes at different times. The
problem is that these classes may have the same name. Is there any way to
unload a class at runtime so that it can be replaced with another of the
same name?

Tony
Jul 17 '05 #1
1 4692
Tony Burrows wrote:
I need to be able to load different classes at different times. The
problem is that these classes may have the same name. Is there any way to
unload a class at runtime so that it can be replaced with another of the
same name?

Tony

In JDK1.5 thi swill be possible using debugging interface, for now, do
the followin:

1. Create your onw class loader class (just derive from the sun class).
2. New up this class loader and have it load you class
3. When new veriso is needed drop the reference to your own class loader
and do it again.

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by LilleSkutt | last post: by
9 posts views Thread by Rom Marshall | last post: by
2 posts views Thread by Arthur Roodenburg | last post: by
5 posts views Thread by vineeth | last post: by
2 posts views Thread by Guru Prasad | last post: by
5 posts views Thread by Bob | last post: by
reply views Thread by ibenc | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.