Link to home
Start Free TrialLog in
Avatar of geff_chang
geff_changFlag for Philippines

asked on

? tool for windows that is the same as linux compress

my java project requires that i use linux's "compress" command,
because the system is to be deployed on a linux server.

other than using the linux OS (because i'm on windows),
is there any other way to exactly emulate linux's "compress"
command, like an executable for example?
Avatar of Tommy Braas
Tommy Braas
Flag of Australia image

I believe that compress supports the Zip format. Try that first.
You can create both Zip and GZIP files from inside Java. You need to use GZIP, not Zip as I stated earlier.

There is a Windows executable for gzip which will create compress compatible archives here http://www.gzip.org/
Avatar of sciuriware
sciuriware

The good old compress is NOT zip or gzip because of some patent
by Sperry (now Unisys).
But the C-source might be still around on BSD or such.
You should look into converting all operations to GZIP
which is implemented in JAVA.
I already searched for a compress class for JAVA during 3 years and in vain.

;JOOP!
Avatar of Siva Prasanna Kumar
check out this link as it also you to create a zip file using java it self.

http://www.devshed.com/c/a/Java/Zip-Meets-Java/
Why not just jar?
Avatar of geff_chang

ASKER

thanks for your interesting suggestions,
but the "compress" command is necessary, as it is to be run on linux,
and the requirements specifications requires it to be compressed and sent
to a server in that manner.

i guess i must really work on linux and use the Runtime class to execute compress.
geff_chang didn't get it that alternatives exist for 'compress'.
I found one source of 'compress'-code, nl. in Total Commander by Ghisler,
but then it's easier to use the C-source from UNIX.
There is no JAVA code available compatible with compress.

The questioner found a solution (Runtime.exec() ) that I too found.
However, the question was: is there ...
and the good, although disappointing, answer is NO.
I don't know what rewards to what grade are usual in such a case.

;JOOP!
ASKER CERTIFIED SOLUTION
Avatar of CetusMOD
CetusMOD
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial