This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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
Are you certain that PKUnzip can handle Deflater.DEFAULT_COMPRESSION?
Here is a canonical example of how to create ZIP files.
Joined: Jul 05, 2001
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