File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes What can be the problem cause ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "What can be the problem cause ?" Watch "What can be the problem cause ?" New topic

What can be the problem cause ?

Muhammad Asif
Ranch Hand

Joined: Jul 13, 2001
Posts: 202
Hi All,
I am trying to Extract a zip file!
When I try to open the file using
ZipFile zFile = new ZipFile(zipFile);
i get the following exception : error in opening zip file
java.lang.Exception(java.lang.String) (java.lang.String)
Can some one figure out the problem ???
And one more thing,
I am able to open the zip file using WinZip without ne problems!
Muhammad Asif Abbasi

Karl Laird
Ranch Hand

Joined: Jul 14, 2001
Posts: 67
The unfortunate problem here is that java Zip is incompatible with regular Zip algorithms.
You can only open Zip files that have been made by a java Zip file writer - not Winzip archives.
Hopefully this will be corrected in a later version of the JDK

The Eagle sneers at the Peacock<p>Systems Administrator<br />OrderWare Solutions Ltd<br /><a href="" target="_blank" rel="nofollow"></a>
Snigdha Solanki
Ranch Hand

Joined: Sep 07, 2000
Posts: 128
Which version of JDK are you using? In JDK 1.3 it
is possible to open zip files which are created using Winzip or any other archiving tool. I am not sure about older versions but your program should work fine on JDK1.3.

Snigdha<br />Sun Certified Programmer for the Java™ 2 Platform
I agree. Here's the link:
subject: What can be the problem cause ?
It's not a secret anymore!