> All,
>
[quoted text clipped - 9 lines]
> appropriate. When I rename the file to .gz file and run gunzip on it,
> it comes with "file exists" error.
gunzip uses the gzip algorithm. Java's jar command, and the
java.util.zip package, use the PKZIP algorithm, which is not compatible
with gzip.
> I want to achieve the following things:
> a) I want to compress a folder recursively.
[quoted text clipped - 10 lines]
>
> On Solaris however, I was able to unzip it.
Solaris's unzip command uses the PKZIP algorithm.
> Solaris8 $ unzip XXXX.zip
> Archive: XXXX.zip
[quoted text clipped - 10 lines]
>
> I appreciate any inputs on this issue.
Does your HPUX system have the Java SDK installed? If so, try
jar -t <XXXX.zip
to see a list of files in the .zip archive, and try
jar -x <XXXX.zip
to uncompress them. Note: If a Java JRE is installed but not the SDK, try
java sun.tools.jar.Main -t <XXXX.zip
or
java sun.tools.jar.Main -x <XXXX.zip
--Mike Amling
ctippur@gmail.com - 02 Dec 2005 04:56 GMT
Thanks for the reply.
This certainly works with jar utility.
Is jar available on hpux and AIX with standard distribution?
- Shekar
ctippur@gmail.com - 02 Dec 2005 11:02 GMT
Is there a java utility available which uses the compress algorithm?
compress is a tool available on all the platforms (as far as I can
tell).
- Shekar
glen herrmannsfeldt - 04 Dec 2005 01:23 GMT
(snip)
> gunzip uses the gzip algorithm. Java's jar command, and the
> java.util.zip package, use the PKZIP algorithm, which is not compatible
> with gzip.
Traditionally gunzip could unzip single file zip files,
and, I believe, the first file of multiple file ones. I don't remember
why it could do this, though. I have used jar for zip files when I
didn't have unzip.
-- glen
Mike Amling - 04 Dec 2005 20:59 GMT
> (snip)
>
[quoted text clipped - 6 lines]
> why it could do this, though. I have used jar for zip files when I
> didn't have unzip.
Yes, that is true. Rather than "not compatible with", I should have
said "not fully compatible with" or "not the same as".
--Mike Amling