jar tool bug

Patrick Tullmann tullmann at cs.utah.edu
Fri Oct 27 10:16:55 PDT 2000


The jar tool blows up if a zero-byte manifest file is provided.  Sun's 
jar tool does not blow up.  Here's how to reproduce it:

$ touch manifest
$ jar -cfm asdf.jar manifest manifest

You'll get something like this:
java.io.IOException: premature EOF, line 1
        at java.lang.Throwable.fillInStackTrace(Throwable.java:native)
        at java.lang.Throwable.<init>(Throwable.java:38)
        at java.lang.Exception.<init>(Exception.java:24)
        at java.io.IOException.<init>(IOException.java:25)
        at java.util.jar.Manifest.read(Manifest.java:247)
        at java.util.jar.Manifest.<init>(Manifest.java:36)
        at kaffe.tools.jar.Jar.createJar(Jar.java:886)
        at kaffe.tools.jar.Jar.processJar(Jar.java:399)
        at kaffe.tools.jar.Jar.start(Jar.java:60)
        at kaffe.tools.jar.Jar.main(Jar.java:39)

Sun's tool creates a valid jar file.

-Pat

----- ----- ---- ---  ---  --   -    -      -         -               -
Pat Tullmann                                       tullmann at cs.utah.edu
	   "I'd kill for a Nobel Peace Prize." -- S. Wright


More information about the kaffe mailing list