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 Zip question 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 "Zip question" Watch "Zip question" New topic

Zip question

Max Power
Ranch Hand

Joined: May 10, 2004
Posts: 47
hello, i have written a small program that extracts zipfiles. but somehow this only works with some zipfiles. somtimes i am getting a filenotfoundexception at the commented line?! why that? here is the code:

whats wrong with the code?

Mag Hoehme
Ranch Hand

Joined: Apr 07, 2002
Posts: 194
Hallo Andreas,

I tried to check your code, but I did not find any problem with it.

When does it throw the FileNotFoundException?
Which paramters did you enter?
What is the value of the p parameter?
Is it possible that some other process is locking the file indicated by p while your unzip program tries to open it?

Max Power
Ranch Hand

Joined: May 10, 2004
Posts: 47
hi, i rewrote the program and now it works....thanks
It is sorta covered in the JavaRanch Style Guide.
subject: Zip question
It's not a secret anymore!