File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes making zip file at runtime Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "making zip file at runtime" Watch "making zip file at runtime" New topic

making zip file at runtime

Kavita Ghia
Ranch Hand

Joined: Oct 10, 2000
Posts: 91
Hello Friends,
I have two files one is with extension ".exe" and other is with extension ".txt" i.e
1) file1.exe
2) file2.txt
I want to make this file into zip format. This will be achieve during run-time.I have written one "Servlet" in which i'm using ZipEntry class.But i'm unable to do so.
Thanks in advance,

Frank Carver

Joined: Jan 07, 1999
Posts: 6920
You say you are unable to use the ZipEntry class - why not? what is wrong?

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Carl Trusiak

Joined: Jun 13, 2000
Posts: 3340
Here is a class that I use to zip all the log files in a directory

hope this helps

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
Kavita Ghia
Ranch Hand

Joined: Oct 10, 2000
Posts: 91
Thanks Carl your code has helped.
I agree. Here's the link:
subject: making zip file at runtime
It's not a secret anymore!