Is there a solution for setting up the reflection library so that it also looks at JARs that are added at runtime using the URLClassLoader?
Now reflections just look at the URLs in ClassLoader. This is the configuration I'm using now:
Reflections reflections = new Reflections(new ConfigurationBuilder().setUrls(ClasspathHelper.forClassLoader()));
I could not find any hints in the reflection library document.
EDIT: This is how I upload the jar file:
File f = new File("C:/Users/mkorsch/Desktop/test-reflections.jar"); URLClassLoader urlCl = new URLClassLoader(new URL[] {f.toURI().toURL()},System.class.getClassLoader());
source share