Java.lang.IllegalArgumentException:MALFORMED encountered while compressing/extracting zip

Source: Internet
Author: User
Tags unpack

Error Details:

slf4j:failed to load Class "Org.slf4j.impl.StaticLoggerBinder".

Slf4j:defaulting to No-operation (NOP) Logger implementation
Slf4j:see Http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" Java.lang.IllegalArgumentException:MALFORMED
At Java.util.zip.ZipCoder.toString (zipcoder.java:58)
At Java.util.zip.ZipFile.getZipEntry (zipfile.java:529)
At java.util.zip.zipfile.access$900 (zipfile.java:56)
At Java.util.zip.zipfile$1.nextelement (zipfile.java:511)
At Java.util.zip.zipfile$1.nextelement (zipfile.java:481)
At Org.zeroturnaround.zip.ZipUtil.iterate (ziputil.java:366)
At Org.zeroturnaround.zip.ZipUtil.unpack (ziputil.java:772)
At Org.zeroturnaround.zip.ZipUtil.unpack (ziputil.java:755)

At Com.webthk.map.utils.ImageCutUtil.main (imagecututil.java:29)


Workaround:

Replace the original decompression plug-in with the Org.apache.ant-based decompression method

In addition, the decompression RAR can be solved with Java-unrar-0.3.jar (refer to http://blog.csdn.net/zheng2008hua/article/details/6998345)

(Refer to http://www.blogjava.net/icewee/archive/2012/05/26/379267.html)

Reason:

There are two possibilities: the Java path problem will change "\" to "\" to

Because there is a problem with the format conversion under Java.util.zip, there is a problem with the character encoding of the zip in the JDK. The default encoding for Windows compression is GBK (words can be resolved by modifying the JDK, technical difficulty is too high, not pro-test)



Java.lang.IllegalArgumentException:MALFORMED encountered while compressing/extracting zip

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.