This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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.
Ping & DNS - updated with new look and Ping home screen widget
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