jQuery in Action, 3rd edition
The moose likes Java in General and the fly likes UnZip error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "UnZip error " Watch "UnZip error " New topic

UnZip error

benny rusli
Ranch Hand

Joined: Jan 15, 2005
Posts: 72
Hello Everybody,
i have a following code to unzip a zip file, but if i try to unzip
with the command: java UnZip C:\backup_11-02-05_10-03-PM.zip.
There is a error which throw :
Extracting : c:\DA\backup_pro.java
java.io.FileNotFoundException : c:\DA\backup_pro.java
at.java.io.FileOutputStream.open<Native Method>
at UnZip.main<UnZip.java:64>
if i try to open with winzip there is no error, besides that i try to open another zip file with this program and the program could be opened without problem.

And i try another program from http://www.devshed.com/c/a/Java/Zip-Meets-Java/2/ but without success

I think the problem special character such as "_/-%���" from within(or because the name of zip file "backup_11-02-05_10-03-PM.zip") the zip file, but i do not sure, if yes ? how do i overcome the problem ?
Can someone give me a hint ? thank you very much
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Unfortunately, line 64 is...

Why does the jvm tell you the linenumber?
Perhaps to make the source of error easy to find?

Try in the saveEntry Method:

and ask yourself, if it is, what you expected...

benny rusli
Ranch Hand

Joined: Jan 15, 2005
Posts: 72
Hallo everybody,
hallo Stefan, what do you mean with line 64, i think line 64 is not wrong.
I try another program code, but i got not success, the error is the same and if the zip file consist of subdirectory and ���(umlaute or special character), the program won't unzip it but if the zip file only consist of one directory without special character, it will be successfully. I have read many forum, they said that the problem is in encode and decode the special character(it is recommended to use UTF-8 or UTF-16). Is that right ? but how should i use it. Any Help will be appreciated.

benny rusli
Ranch Hand

Joined: Jan 15, 2005
Posts: 72
Hallo everybody,
i have a new problem, if i jar a 11GB Files with my programm code, there is no problem but if i unjar it, there is an error like this :
java.util.zip.ZipException : zip file too large
how can i overcome the problem ?

I agree. Here's the link: http://aspose.com/file-tools
subject: UnZip error
It's not a secret anymore!