ExtensionClassLoader
com.jsmacrosce.jsmacros.core.extensions.ExtensionClassLoader
Loads extension classes and resources from jar files on a URL search path.
Every archive this loader reads exists as a file first. The extension loader copies a nested archive, such as a dependency inside an extension jar, out of its container before adding it here, because a URLClassLoader cannot open an archive that is itself an entry of another archive.
The parent is the class loader that defined ExtensionClassLoader; class loading otherwise follows the inherited parent-first delegation model, so an extension always uses the core's own classes.
js
const Loader = Java.type("com.jsmacrosce.jsmacros.core.extensions.ExtensionClassLoader");
const urls = Java.to([], "java.net.URL[]");
const loader = new Loader(urls);
try {
loader.loadClass("java.lang.String");
} finally {
loader.close();
}