• Post Reply Bookmark Topic Watch Topic
  • New Topic

zip file problem

 
Miran Cvenkel
Ranch Hand
Posts: 202
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

first line goes ok, so file is there and ok, second:
error in opening zip file.

i can open that file with rar, zip,..., it has all permisions.

What could be the prob ?
 
Greg Charles
Sheriff
Posts: 3010
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the error?
 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote the following code and know that test.txt does not exist. The code did not complain.

ZipFile(f); can throw two exceptions: ZipException and IOException. What error are you getting?
 
Miran Cvenkel
Ranch Hand
Posts: 202
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

"error in opening zip file"
cause 4062
 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a code update and the results.
 
Miran Cvenkel
Ranch Hand
Posts: 202
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
transfering to the end of thread, I guess b= true means that my path to file is ok, and it is realy there.

Miran Cvenkel wrote:
"error in opening zip file"
cause 4080
 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure you are using the right file path? What does f.exists() return? And f.canRead()?
 
Miran Cvenkel
Ranch Hand
Posts: 202
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
both true.

you can get file itself here:
webpage
but as I said I can open it with zip,rar programs , so it is ok. I guess.
 
Joe Ess
Bartender
Posts: 9362
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Miran Cvenkel wrote:but as I said I can open it with zip,rar programs , so it is ok. I guess.


A few topics down from this we explore that there are several different standards for Zip files and not all are supported by the Java implementation.
What did you use to create the zip file?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!