[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#116145: fastjar in update mode is buggy



package: fastjar
Version: 1:3.0.2-0pre010908

Please look at the following command history.  'jar' is from j2sdk1.3.

Not only does fastjar obliterate existing contents in a jar when updating,
but, it appears it can also corrupt the file.

This mis-feature is making it difficult(read, impossible) for me to treat jar
files like .ar files, in make.


adam@doogie2:~/brainfood/jboss/test/build/src$ rm foo.jar
adam@doogie2:~/brainfood/jboss/test/build/src$ jar -cf /home/adam/brainfood/jboss/test/build/src/foo.jar -C java org/doogie/jboss/test/RemoteFile.class
adam@doogie2:~/brainfood/jboss/test/build/src$ jar -uf /home/adam/brainfood/jboss/test/build/src/foo.jar -C java org/doogie/jboss/test/RemoteHome.class
adam@doogie2:~/brainfood/jboss/test/build/src$ unzip -tv foo.jar
Archive:  foo.jar
    testing: META-INF/                OK
    testing: META-INF/MANIFEST.MF     OK
    testing: org/doogie/jboss/test/RemoteFile.class   OK
    testing: org/doogie/jboss/test/RemoteHome.class   OK
No errors detected in compressed data of foo.jar.
adam@doogie2:~/brainfood/jboss/test/build/src$ rm foo.jar
adam@doogie2:~/brainfood/jboss/test/build/src$ fastjar -cf /home/adam/brainfood/jboss/test/build/src/foo.jar -C java org/doogie/jboss/test/RemoteFile.class
adam@doogie2:~/brainfood/jboss/test/build/src$ fastjar -uf /home/adam/brainfood/jboss/test/build/src/foo.jar -C java org/doogie/jboss/test/RemoteHome.class
adam@doogie2:~/brainfood/jboss/test/build/src$ unzip -tv foo.jar
Archive:  foo.jar
    testing: META-INF/                OK
    testing: META-INF/MANIFEST.MF     OK
    testing: org/doogie/jboss/test/RemoteHome.class   OK
No errors detected in compressed data of foo.jar.
adam@doogie2:~/brainfood/jboss/test/build/src$ fastjar -uf /home/adam/brainfood/jboss/test/build/src/foo.jar -C java org/doogie/jboss/test/RemoteFile.class
adam@doogie2:~/brainfood/jboss/test/build/src$ unzip -tv foo.jar
Archive:  foo.jar
    testing: META-INF/                OK
    testing: META-INF/MANIFEST.MF     OK
    testing: org/doogie/jboss/test/RemoteFile.class   OK
No errors detected in compressed data of foo.jar.
adam@doogie2:~/brainfood/jboss/test/build/src$ fastjar -uf /home/adam/brainfood/jboss/test/build/src/foo.jar -C java org/doogie/jboss/test/RemoteHome.class
adam@doogie2:~/brainfood/jboss/test/build/src$ unzip -tv foo.jar
Archive:  foo.jar
error [foo.jar]:  start of central directory not found;
  zipfile corrupt.
  (please check that you have transferred or created the zipfile in the
  appropriate BINARY mode and that you have compiled UnZip properly)





Reply to: