"bill.burke(a)jboss.com" wrote : Found out some things about classloading and
URLClassLoader:
|
| * a sun URLClassPath class is used to get .class files as a resource
| * If the URL ends in '/' a "directory" based approach seems to be
used and the URLClassPath class concatenates the resource name to the base URL to open the
file.
|
| So, when a resource is looked up it will do
|
| vfsfile:/foo.jar/org/jboss/SomeClass.class
|
| to find the resource.
|
| My current guess is that JarFile's are not reentrant nor threadsafe. I took a
look at truezip, but it is currently totally based upon java.io.File and a real file
system. So you can't just pass in any old URL to get access to the JAR file.
|
|
I'm going to remove the "/" from the end of any JAR vfsfile: URL so that
URLClassLoaders will treat the vfsfile: URL as a JAR rather than raw URLs. I couldn't
figure out why using raw URLs with the VFS does not work. This leads me to believe we
will initially not be able to support an exploded archive nested within an unexploded
archive and this will effect things like a WAR's WEB-INF/classes.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980595#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...