JAR files

Archie Cobbs archie at whistle.com
Tue Mar 21 09:44:52 PST 2000

Timothy Stack writes:
> I've been working on a small rewrite of the JAR file code in
> kaffe/kaffevm/jar.* and I have some questions.  The new code is mostly
> just a cleanup of the older stuff, the directory entries are read a
> little faster and the entries are stored in a hash table instead of a
> linked list.  The problem I'm having is that I'm trying to cache the
> jarFile objects so that we don't have to reread them constantly, but I
> don't know what the semantics are between the JAR files and the JVM.
> Can the JAR files change while the JVM is running?  And if so, what

I've never heard any specification about handling the case where the
JAR file changes out from under the VM .. hmm, what does the JDK do?
In any case it's probably not a problem either way you do it.

> are we supposed to do?  There are also restrictions because the code
> is used by java.util.ZipFile, so we have to handle generic zip files
> and may not be able to specialize to the JAR files.   Also, if you
> have any thoughts about things you wanted to add I'd appreciate
> your input.

JAR files and ZIP files are the same from the VM's point of view.
The only difference is the existence of META-INF/MANIFEST.MF, which
is ignored by the VM proper.


Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com

More information about the kaffe mailing list