Jar Class Loader, a configurable and dynamic custom classloader designed to create, manage and manipulate isolated Java classloaders in IoC frameworks and web applications.
You can have jars or classes inside someDirectory too, it doesn't matter.
If you call:
jcl.add("someDirectory")
And then try to call jcl.getResource("someFile"), JCL throws an exception:
org.xeustechnologies.jcl.exception.JclException: java.net.MalformedURLException: no protocol: /home/whoever/file/path/someDirectory/someFilesomeFile
at org.xeustechnologies.jcl.JarResources.getResourceURL(JarResources.java:74)
at org.xeustechnologies.jcl.JarClassLoader$LocalLoader.findResource(JarClassLoader.java:285)
at org.xeustechnologies.jcl.AbstractClassLoader.getResource(AbstractClassLoader.java:150)
Note that the filename (someFile) is actually repeated twice in the returned filename.
I'll submit a PR shortly.
Say you have a directory structure like this:
You can have jars or classes inside
someDirectory
too, it doesn't matter. If you call:And then try to call
jcl.getResource("someFile")
, JCL throws an exception:Note that the filename (
someFile
) is actually repeated twice in the returned filename. I'll submit a PR shortly.