Accessing Resources Embedded in a Dynamically Loaded JAR
Posted on 2010-11-19
I am dynamically loading a JAR and succesfully accessing one of its classes. I am doing this with JarClassLoader. FYI, I was also able to successfully do this with URLClassLoader.
My problem is that the JAR class that I am instantiating is unable to access an XML file cotained in one of the JAR's packages/directories --- a java.io.FileNotFound exception results. Things work fine when I load the JAR on the classpath, but I must do the dynamic load given the architecture within which this has to work.