• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Zip file creation and problems unzipping

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using the java.util.zip.ZipOutputStream to create a zip file. I store it on a server and then invoke a script file that ftp's this zip file to our mainframe environment where a COBOL program tries to unzip it with PKUnzip. Each time they try to unzip my zip file they get an "invalid zip archive" error. But I am able to unzip it with WinZip. Does anyone have any experience with this or know of anything I can do differently? I've put a code snippet of how I zip the text file below.
Thanks, Donna

 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you certain that PKUnzip can handle Deflater.DEFAULT_COMPRESSION?

Here is a canonical example of how to create ZIP files.
 
Donna Reschke
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well I ended up commenting out the "setLevel" instruction which I'm not sure if that was causing part of the problem or not. The real issue was that I wasn't specifying "binary" when I ftp'd the file to the mainframe. ONce I did that, the COBOL program was able to unzip the file.
Thanks!
Donna
 
reply
    Bookmark Topic Watch Topic
  • New Topic