Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Help > Re: Is there re...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 18 Topic 16031 of 16466
Post > Topic >>

Re: Is there really no wildcard adding for "jar -cvf my.jar cl*****\*.class" ?

by "John B. Matthews" <nospam@[EMAIL PROTECTED] > Apr 28, 2008 at 05:15 PM

In article <48162a7a$0$7540$9b4e6d93@[EMAIL PROTECTED]
>,
 gremlin@[EMAIL PROTECTED]
 (Catherina Svensson) wrote:

> When I try to execute a jar command like the following: 
> jar -cvf my.jar cl*****\*.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 cl*****\a.class cl*****\b.class ... cl*****\z.class
> then everything is fine.
[...]

Assuming you want to preserve the existing directory structure:

$ ls *
MANIFEST.MF     clip.class      clip.java       clip.jpg
cl*****:
one.class       two.class

$ jar cvmf MANIFEST.MF temp.jar *.class cl*****/*.class 
added manifest
adding: clip.class(in = 2241) (out= 1203)(deflated 46%)
adding: cl*****/one.class(in = 2241) (out= 1203)(deflated 46%)
adding: cl*****/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
 




 18 Posts in Topic:
Is there really no wildcard adding for "jar -cvf my.jar classes\
gremlin@[EMAIL PROTECTED]  2008-04-28 19:50:18 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
Thomas Kellerer <FJIFA  2008-04-28 22:27:21 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
"John B. Matthews&qu  2008-04-28 17:15:24 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
Knute Johnson <nospam@  2008-04-28 14:38:41 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
Roedy Green <see_websi  2008-04-28 21:44:36 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
Knute Johnson <nospam@  2008-04-28 14:59:13 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
Knute Johnson <nospam@  2008-04-28 14:45:53 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
Mark Space <markspace@  2008-04-28 15:19:15 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
Knute Johnson <nospam@  2008-04-28 21:46:11 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
Mark Space <markspace@  2008-04-29 08:37:57 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
=?ISO-8859-1?Q?Arne_Vajh=  2008-04-28 18:39:18 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
Donkey Hot <spam@[EMAI  2008-04-29 05:38:13 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
Lew <lew@[EMAIL PROTEC  2008-04-29 07:32:45 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
"Arved Sandstrom&quo  2008-04-29 15:00:22 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
Perry Wolfe <pwolfe@[E  2008-05-01 09:03:47 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
=?ISO-8859-1?Q?Roger_Lind  2008-05-01 16:46:37 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
Logan Shaw <lshaw-usen  2008-05-04 09:54:06 
Re: Is there really no wildcard adding for "jar -cvf my.jar clas
efriedNoSpam@[EMAIL PROTE  2008-05-05 03:02:33 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 6 10:59:41 CDT 2008.