First off, he's obviously doing this programatically...see the following references:
java.util.zip.ZipFile new ZipFile(file) so the command line JAR utility is of no use. Secondly, true enough, jar files and zip files may use the same compression algorithms and the classes in java.util.jar frequently extend classes in java.util.zip (and lo and behold JarFile actually extends ZipFile) they are named differently based upon their intended usage, so programatically calling an object a ZipFile gives you a set of methods, while calling it a JarFile gives you an extended set. Unfortunately, upon looking over the calsses quickly I cannot determine what may be causing the undesired output. Greg > -----Original Message----- > From: Steve Gawron [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 06, 2003 3:46 AM > To: JDJList > Subject: [jdjlist] Re: Unexpected std err output from > ZipEntry comments > > > The java utility "JAR" uses the same algoritm as *.zip files. > Any reason you didn't use it? > > Steve > > -------Original Message------- > From: Alastair Rodgers <[EMAIL PROTECTED]> > Sent: 02/05/03 12:26 PM > To: JDJList <[EMAIL PROTECTED]> > Subject: [jdjlist] Unexpected std err output from ZipEntry comments > > > > > I'm using java.util.zip.ZipFile to check the contents of a > zip file. The > zip file in question has comments attached to each zip entry. The > problem is that as soon as I create the ZipFile object (new > ZipFile(file)), the following message is printed to the standard error > stream: > > > Allocating ZIP comments array > Added ZIP comment "Test comment 1" > Added ZIP comment "Test comment 2" > Added ZIP comment "Test comment 3" > > > (zip file contains 3 files, each with a distinct comment). > > Although this doesn't affect functionality, I'm using this in a server > app where remote clients can upload zip files, and I don't really want > lots of spurious comments in the logs. > > I can't find anywhere in the JRE source code where it prints out these > messages, & Google failed to turn anything up. Has anyone else come > across this and can anyone explain why I'm seeing these messages and > where they're coming from? > > I've tried this using a Sun 1.3.1 JVM on Win2000 & RedHat and get the > same results on both. > > Thanks, > Al. > > ____________________________________________________ > To change your JDJList options, please visit: > http://www.sys-con.com/java/list.cfm > > Be respectful! Clean up your posts before replying > ____________________________________________________ > > > > ____________________________________________________ > To change your JDJList options, please visit: > http://www.sys-con.com/java/list.cfm > > Be respectful! Clean up your posts before replying > ____________________________________________________ > ____________________________________________________ To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm Be respectful! Clean up your posts before replying ____________________________________________________
