This looks bad. If our analysis is correct, using URLClassLoader with jar files is simply broken. It opens the file using an internal cache, attempting to reuse a previously-opened JarFile. But if you close the URLClassLoader, it also closes the JarFile, poisoning the cache.