Using JDK 8, I have simply been using the following:
URL[] urls = ((URLClassLoader) ClassLoader.getSystemClassLoader()).getURLs();
It appears this breaks in JDK 9+ as the ClassLoader is no longer a URLClassLoader.
How would I go about getting the current classpath if it has been modified by multiple classloaders?