I want to implement PriorityClassLoader which can do following:
- It accepts default
ClassLoaderinstance as a constructor parameter - It has
addURLmethod which work likeaddURLinURLClassLoader, but for each new URL it set the priority.
When the class should be loaded, loader first will try to load it with default classloader, if not - from the provided URLs according to the priority. Is there any ready solutions?
PS - my original problem was following - I wanted to add URL to the system classloader, but it began to fail on the duplicate classes in system classloader and remote JAR.