Hello all, Is there a way to add (or extend existing) classes at runtime in java. I'm stuck on a problem, in which I have to extend an existing class at runtime and add this to the classpath, so that this new class get picked up.
thanks,
Hello all, Is there a way to add (or extend existing) classes at runtime in java. I'm stuck on a problem, in which I have to extend an existing class at runtime and add this to the classpath, so that this new class get picked up.
thanks,
You should definitely write why you need this feature. If you attempt to add or replace logic at runtime you might want to have a look at the scripting API and some actual implementations.
There are a number of ways you could do this.
I imagine there are other options.