| Author |
Reload a modified java class
|
Manu Somasekhar
Ranch Hand
Joined: May 22, 2012
Posts: 30
|
|
Hi,
I was doing some byte code injection with asm. I tried to inject some code to the class file. But it is found that if I tried to find the injected code, it is not available within the already loaded class. So a clean restart of JVM is required to find the injected code within the object.
So I was wondering how can I reload a class without restarting the JVM ?
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16487
|
|
|
Byte code injection and class loading aren't really beginning topics, so I'm going to move this thread.
|
 |
Manu Somasekhar
Ranch Hand
Joined: May 22, 2012
Posts: 30
|
|
Thanks Paul.
Once again I am answering to my own question.
In order to achieve what I mentioned, one needs to extend ClassLoader and try to reload the classes when ever required.
I got the answer from here
webpage
|
 |
 |
|
|
subject: Reload a modified java class
|
|
|