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
can even cause crashes too (when JAR/zip files are memory mapped). That
said, the class path can extend over time, the most obvious being when
JAR files have the Class-Path attribute. It is possible to construct a
cache at run-time that is package name -> the first JAR file containing
that package but at the cost of scanning the contents of JAR files
(probably on open). There was a lot of experiments and prototypes in the
past along these lines.
-Alan.