GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes Reloading classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Reloading classes" Watch "Reloading classes" New topic
Author

Reloading classes

Amer Seifeddine
Ranch Hand

Joined: Apr 25, 2002
Posts: 57
Dear All,

What is the easiest or best way to reload classes while an application is running to reflect the changes? Any link?

Thanks,
Amer.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
You can make a new ClassLoader instance that will reload the class to make new object instances. That does nothing to change any instances that already exist, and you have to make sure that any new instances are made through the new loader. Read up on ClassLoader and give it a try. Let us know what you find!


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
GeeCON Prague 2014
 
subject: Reloading classes