Steve Cohen wrote:
>
> MYSTERY SOLVED!
> Jar behaves rather oddly under Win95 and this caused me to become confused.
> When I unjarred the file under Win95, I looked in the Windows Explorer for
> the products. I immediately noticed under the directory where I did the
> unjarring, a new path mirroring the path under linux where the files were
> created, which contained a bunch of class files. I ALSO noticed some class
> files in the directory where I did the unjarring, but I assumed that these
> were from a previous compilation, deleted them, and copied in the ones from
> the unix-like path. However, this set did NOT include any of the inner
> classes, the $1, $2 etc. So I now had an incomplete set of files and the
> program wouldn't run.
>
> When I just ran the files that jar unzipped, it all worked fine. Duh.
>
> I am wondering, however, why Jar makes this additional mirror of the
> original directory structure and places in it an incomplete set of files.
>
It turns out that the wildcard expansion under Win95 does not include filenames
containing '$'. Thus, if you say, "jar cvf fubar.jar *.class", you won't get
any of your anonymous classes.
Fixes:
1) Explicitly pass all .class files to the jar command line.
2) Try using a *real* shell. The dos shell, in a word, sucks. Try the bash
shell, included in the Cygwin32 utilities, available from cygnus
(http://www.cygnus.com). It behaves as expected, and makes the WinNT command
line almost as comfortable to me as the Linux command line.
-dan
[EMAIL PROTECTED]
[EMAIL PROTECTED]