Suppose I try to extract a file from a jar file, and the file I ask
for isn't in the archive, but what I ask for is a substring of
something that is in the jar file:
athyra$ ls
foo.jar
athyra$ jar tf foo.jar
META-INF/
META-INF/MANIFEST.MF
foo.pl
jar will extract the file that's in the archive, even though it's not
what I asked for.
athyra$ jar xf foo.jar foo
athyra$ ls
foo.jar foo.pl
Furthermore, if this other file already exists, jar will clobber it.
athyra$ echo blah >| foo.pl
athyra$ sum foo.pl
57449 1
athyra$ jar xf foo.jar foo
athyra$ sum foo.pl
54618 1
for isn't in the archive, but what I ask for is a substring of
something that is in the jar file:
athyra$ ls
foo.jar
athyra$ jar tf foo.jar
META-INF/
META-INF/MANIFEST.MF
foo.pl
jar will extract the file that's in the archive, even though it's not
what I asked for.
athyra$ jar xf foo.jar foo
athyra$ ls
foo.jar foo.pl
Furthermore, if this other file already exists, jar will clobber it.
athyra$ echo blah >| foo.pl
athyra$ sum foo.pl
57449 1
athyra$ jar xf foo.jar foo
athyra$ sum foo.pl
54618 1
- relates to
-
JDK-6959595 "jar xf" exits with status 0 even if requested file isn't in jar file
-
- Closed
-