So far, the examples I have seen for custom ClassLoaders involve subclassing the URLClassLoader, and using that specific instance to load classes in resources.
I have tried in vain to look for alternative methods to replace the SystemClassLoader, so that my ClassLoader can be consulted for classes not located in the classpath.
I tried Thread.currentThread().setContextClassLoader
, but it doesn't seem to work.
Is it even possible?
See Question&Answers more detail:os