Re: Cache which java classes are in a jar when opening jar the first time during classloading

2015-09-01 Thread Adrian
I took a closer look at the URLClassLoader/URLClassPath/JarFile/ZipFile code, and it doesn't seem to handle the jars being modified from an external source; even though URLClassPath iterates through all the jars in order each time searching for a resource, the JarFile objects never get updated if t

Re: Cache which java classes are in a jar when opening jar the first time during classloading

2015-08-31 Thread Alan Bateman
On 31/08/2015 04:02, Jonathan Yu wrote: Hi Adrian, It's possible for jar files to be modified while the JVM is running - is there some facility for detecting that an archive was modified and thus invalidating the cache? Modifying a JAR file that is in use leads to unpredictable behavior and

Re: Cache which java classes are in a jar when opening jar the first time during classloading

2015-08-30 Thread David Holmes
On 31/08/2015 4:01 PM, Adrian wrote: Hi Jonathan, I'm not aware of any specific facilities for detecting that a jar file was modified I believe as it is it doesn't update its internal structures (the jzfile and jzcells and jzentries) if it was modified from an outside source If I am wrong about

Re: Cache which java classes are in a jar when opening jar the first time during classloading

2015-08-30 Thread Jonathan Yu
Hi Adrian, It's possible for jar files to be modified while the JVM is running - is there some facility for detecting that an archive was modified and thus invalidating the cache? Also, I wonder how class data sharing might interact with this, though I'll admit that I don't know much about HotSpo