L
lee
Hi all,
I hope this isn't too obvious a question - I cannot find an answer
anywhere.
I have some classes I need to load using reflection. These classes
are generated and compiled at runtime by my app, so the only info I
have about them is their location. I therefore get a list of the
filenames, and loop through these using a URLClassLoader to load
them in.
However, I am obtaining a NoClassDefFoundError due to the
dependancies between classes. For instance, say we have (interface)
ClassA, and ClassB. ClassB implements ClassA.
No matter which order I load these, I get the NoClassDefFoundError
when loading ClassB. I really don't want to have to try to force
these classes to be on the classpath - that wouldn't work anyway as
when they are generated, they are in their package directory
structure. They have to be loaded straight after creation and their
complilation, so I cannot restart my app either.
Can anyone assist me with this?
Many thanks
Lee.
I hope this isn't too obvious a question - I cannot find an answer
anywhere.
I have some classes I need to load using reflection. These classes
are generated and compiled at runtime by my app, so the only info I
have about them is their location. I therefore get a list of the
filenames, and loop through these using a URLClassLoader to load
them in.
However, I am obtaining a NoClassDefFoundError due to the
dependancies between classes. For instance, say we have (interface)
ClassA, and ClassB. ClassB implements ClassA.
No matter which order I load these, I get the NoClassDefFoundError
when loading ClassB. I really don't want to have to try to force
these classes to be on the classpath - that wouldn't work anyway as
when they are generated, they are in their package directory
structure. They have to be loaded straight after creation and their
complilation, so I cannot restart my app either.
Can anyone assist me with this?
Many thanks
Lee.