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



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.

Is there really no flag/option to let users pass wildcards for jar adding operations ?

Wildcards works fine.

C:\>jar cvf z.jar Z*.class
added manifest
adding: Z1.class(in = 204) (out= 118)(deflated 42%)
adding: Z2.class(in = 204) (out= 118)(deflated 42%)
adding: Z3.class(in = 204) (out= 118)(deflated 42%)

if you post what error you actually get instead of
"an error about non-existing files/folders", then we may be
able to tell you what the problem is.

Arne
.



Relevant Pages