Re: Is there really no wildcard adding for "jar -cvf my.jar classes\*.class" ?
- From: Mark Space <markspace@xxxxxxxxxxxxxx>
- Date: Tue, 29 Apr 2008 08:37:57 -0700
Knute Johnson wrote:
Mark Space wrote:Catherina Svensson wrote:When I try to execute a jar command like the following:
jar -cvf my.jar classes\*.class
I think it's just:
jar -cvf my.jar classes
That will include all the files in the classes directory, not just .class files. That isn't her problem anyway, she's got a package mismatch between the declarations and the jar structure, and that's why it won't run.
Normally that's what I want -- I'll need to package up any resource files too. And classes in a package normally are stored in subdirectories by the compiler -- *.classes won't get those, but my command line will.
I see your point about my answer being different from the op's point however. If someone actually does need to filter .class files out of a directory, then I think their build process is broken. Get the extraneous stuff out of the classes subdir, put it some where else.
.
- References:
- Prev by Date: Re: Is there an option for auto-create output dirs when compiling with javac?
- Next by Date: Need help to generate critical report
- 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
|
|