Name: skT45625 Date: 08/15/2000
java version "1.2.2"
Classic VM (build JDK-1.2.2-W, green threads, sunwjit)
cd /var/tmp
mkdir -p a/b/c
cd a/b/c
touch foo.txt1
touch foo.txt2
cd ../../..
jar cvf stuff.jar -C /var/tmp a/b/c/foo.txt1 -C /var/tmp/a b/c/foo.txt2
Shouldn't that result in a jarfile whose tf output is like this:
META-INF/
META-INF/MANIFEST.MF
a/b/c/foo.txt1
b/c/foo.txt2
...? Instead, this results in a jarfile whose tf output is like this:
META-INF/
META-INF/MANIFEST.MF
a/b/c/foo.txt1
a/b/c/foo.txt2
...i.e. somehow jar seems to know that really those files are in the same
place? But some -C options work fine. If I -C to another directory entirely:
jar cf stuff.jar -C /var/tmp a/b/c/foo.txt1 -C /var/tmp/a b/c/foo.txt2 -C
/somewhere/else yahoo.txt
...I get a mix:
META-INF/
META-INF/MANIFEST.MF
a/b/c/foo.txt1
a/b/c/foo.txt2
yahoo.txt
What's going on? I was under the impression, as jar's usage message states,
that I could freely use many -C options and that jar would respect the degree of
relativity I specify.
(Review ID: 108469)
======================================================================
java version "1.2.2"
Classic VM (build JDK-1.2.2-W, green threads, sunwjit)
cd /var/tmp
mkdir -p a/b/c
cd a/b/c
touch foo.txt1
touch foo.txt2
cd ../../..
jar cvf stuff.jar -C /var/tmp a/b/c/foo.txt1 -C /var/tmp/a b/c/foo.txt2
Shouldn't that result in a jarfile whose tf output is like this:
META-INF/
META-INF/MANIFEST.MF
a/b/c/foo.txt1
b/c/foo.txt2
...? Instead, this results in a jarfile whose tf output is like this:
META-INF/
META-INF/MANIFEST.MF
a/b/c/foo.txt1
a/b/c/foo.txt2
...i.e. somehow jar seems to know that really those files are in the same
place? But some -C options work fine. If I -C to another directory entirely:
jar cf stuff.jar -C /var/tmp a/b/c/foo.txt1 -C /var/tmp/a b/c/foo.txt2 -C
/somewhere/else yahoo.txt
...I get a mix:
META-INF/
META-INF/MANIFEST.MF
a/b/c/foo.txt1
a/b/c/foo.txt2
yahoo.txt
What's going on? I was under the impression, as jar's usage message states,
that I could freely use many -C options and that jar would respect the degree of
relativity I specify.
(Review ID: 108469)
======================================================================
- relates to
-
JDK-6494520 Documentation of jar -C option
-
- Open
-