Dynamically modify code
Hi
is there a way (or planned technology) that allows to modify code while the application is running?
I mean, besides the class loader, to dynamically load a class, is there a way to unload an already loaded class and load another (compatible) version of it?
thanks in advance
[302 byte] By [
lbettoa] at [2007-11-27 2:35:54]

# 2
> I mean, besides the class loader, to dynamically load> a class, is there a way to unload an already loaded> class and load another (compatible) version of it?As phrased - no.
# 5
> I don't understand your answer: you said that it is
> not possible (your first answer) and then that class
> loading specifically allows for it anyway...
You specifically asked for a solution that did not use a class loader.
But a solution exists using a class loader.
So due to your requirements there is no solution.
And no one is going to change that because everyone else (besides you) seems to be quite happy with using class loaders.
# 7
> so you mean that with a classloader you can unload an
> already loaded class and load another version of it?
Yes.
> That's one of the points of my original question...
It seemed to me that your first post suggested specifically that you did not want to do that.
# 8
> > so you mean that with a classloader you can unload
> an
> > already loaded class and load another version of
> it?
>
> Yes.
OK, thanks, I really did not know this...
is there any documentation on how to unload a class?
>
> > That's one of the points of my original
> question...
>
> It seemed to me that your first post suggested
> specifically that you did not want to do that.
sorry for the misunderstanding: I was assuming it was not possible to unload a class with a class loader and so I had excluded that
# 9
> OK, thanks, I really did not know this...> is there any documentation on how to unload a class?Wrong conceptual model.You don't unload it. You stop using it - no active references.And you start using the new one.