this page suggests the problem is due to (parts of) the zip not being compressed.

Did you set the desiredCompressionMethod to COMPRESSION_DEFLATED?

If that doesn't help, (short) working code that exhibits the problem may shed some light. Alternatively, you could try using an external command-line driven zip program instead of Archive::Zip.

update: I did some experimenting, and I've got nothing. I note that jar can be very picky about its input format, and that although I've used Info-ZIP on linux to create/modify some working jars, I've also run into problems with it (anecdotal - I's been a few years since I tried any of that). Conservative advice would be to unpack the jar however you like it, modify whatever you need, and use the jar program to create a new jar, since that at least should work.


In reply to Re: Archive::Zip Problem: Zip versus Jar file formats by Joost
in thread Archive::Zip Problem: Zip versus Jar file formats by sblanton

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.