Re: Is there really no wildcard adding for "jar -cvf my.jar classes\*.class" ?
- From: "John B. Matthews" <nospam@xxxxxxxxxx>
- Date: Mon, 28 Apr 2008 17:15:24 -0400
In article <48162a7a$0$7540$9b4e6d93@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
gremlin@xxxxxxxxxxx (Catherina Svensson) wrote:
When I try to execute a jar command like the following:[...]
jar -cvf my.jar classes\*.class
then JVM gives me an error about non-existing files/folders.
However when I specify all the class files in detail:
jar -cvf my.jar classes\a.class classes\b.class ... classes\z.class
then everything is fine.
Assuming you want to preserve the existing directory structure:
$ ls *
MANIFEST.MF clip.class clip.java clip.jpg
classes:
one.class two.class
$ jar cvmf MANIFEST.MF temp.jar *.class classes/*.class
added manifest
adding: clip.class(in = 2241) (out= 1203)(deflated 46%)
adding: classes/one.class(in = 2241) (out= 1203)(deflated 46%)
adding: classes/two.class(in = 2241) (out= 1203)(deflated 46%)
The interpretation of wildcards is done by your shell before invoking
jar, which should only see the expanded list of names in your second
example. What shell are you using?
John
--
John B. Matthews
trashgod at gmail dot com
home dot woh dot rr dot com slash jbmatthews
.
- Prev by Date: Re: Is there really no wildcard adding for "jar -cvf my.jar classes\*.class" ?
- Next by Date: Re: Is there really no wildcard adding for "jar -cvf my.jar classes\*.class" ?
- Previous by thread: Re: Is there really no wildcard adding for "jar -cvf my.jar classes\*.class" ?
- Next by thread: Re: Is there really no wildcard adding for "jar -cvf my.jar classes\*.class" ?
- Index(es):
Relevant Pages
|