C
ctippur
All,
I have used java.util.zip package to compress a folder recursively
(which contains sub folders) using the package java.util.zip. It
created a zip file after that. I am unable to unzip OR gunzip this file
on HPUX.
There are couple of problems on HPUX:
1. there is no unzip tool that comes with the OS distribution
2. gunzip tool that resides in /usr/contrib/bin folder is not
appropriate. When I rename the file to .gz file and run gunzip on it,
it comes with "file exists" error.
I want to achieve the following things:
a) I want to compress a folder recursively.
b) I want to be able to access the files within the compressed file via
java
c) the compressed file must be "uncompressable" via tools available
with OS. THe most convenient tool is compress as it is available
everywhere with regular OS distribution.
I have read on java docs that in order to achieve compress via gzip, we
can do that only to a file. We have to essentially tar the folder and
then gzip the tar ball. If we do it this way, can we access the files
within the tar ball via java?
On Solaris however, I was able to unzip it.
Solaris8 $ unzip XXXX.zip
Archive: XXXX.zip
inflating: bin/hpux-risc
inflating: bin/root.sh
inflating: bin/createpackage
inflating: bin/env
inflating: bin/postinstallcheck
inflating: bin/agentconnection.sh
Solaris8 $ ls -ltr
total 1168
-rw-r--r-- 1 itv1 itv1 585115 Dec 1 16:23 XXXX.zip
drwxr-xr-x 2 itv1 itv1 618 Dec 1 16:23 bin
I appreciate any inputs on this issue.
Thanks
- Shekar
I have used java.util.zip package to compress a folder recursively
(which contains sub folders) using the package java.util.zip. It
created a zip file after that. I am unable to unzip OR gunzip this file
on HPUX.
There are couple of problems on HPUX:
1. there is no unzip tool that comes with the OS distribution
2. gunzip tool that resides in /usr/contrib/bin folder is not
appropriate. When I rename the file to .gz file and run gunzip on it,
it comes with "file exists" error.
I want to achieve the following things:
a) I want to compress a folder recursively.
b) I want to be able to access the files within the compressed file via
java
c) the compressed file must be "uncompressable" via tools available
with OS. THe most convenient tool is compress as it is available
everywhere with regular OS distribution.
I have read on java docs that in order to achieve compress via gzip, we
can do that only to a file. We have to essentially tar the folder and
then gzip the tar ball. If we do it this way, can we access the files
within the tar ball via java?
On Solaris however, I was able to unzip it.
Solaris8 $ unzip XXXX.zip
Archive: XXXX.zip
inflating: bin/hpux-risc
inflating: bin/root.sh
inflating: bin/createpackage
inflating: bin/env
inflating: bin/postinstallcheck
inflating: bin/agentconnection.sh
Solaris8 $ ls -ltr
total 1168
-rw-r--r-- 1 itv1 itv1 585115 Dec 1 16:23 XXXX.zip
drwxr-xr-x 2 itv1 itv1 618 Dec 1 16:23 bin
I appreciate any inputs on this issue.
Thanks
- Shekar