i would like to zip two .Txt files in java

hi all,i would like to zip two temporaray files(.Txt) in java
[75 byte] By [manju@ba] at [2007-11-26 15:20:00]
# 1
good for you... what is your question?
Peetzorea at 2007-7-8 11:46:59 > top of Java-index,Java Essentials,New To Java...
# 2
hi thx for u r reply,i have two temporary files(.txt) . is there any java program to zip that two files.
manju@ba at 2007-7-8 11:46:59 > top of Java-index,Java Essentials,New To Java...
# 3
What do you mean by zip? Want to add them to a .zip archive, or want to add them to a .jar archive? You searching for a zip program written in Java?Please explain a bit further..
Tribioa at 2007-7-8 11:46:59 > top of Java-index,Java Essentials,New To Java...
# 4
add them to a .zip archive, i am searching for a zip program written in Java?
manju@ba at 2007-7-8 11:46:59 > top of Java-index,Java Essentials,New To Java...
# 5
http://www.compression-links.info/Link/487_jZip_zipping_program_written_in_Java.htmAnd got there by using following hard code: http://www.google.co.uk/search?hl=en&q=zip+program+written+in+java&btnG=Google+Search&meta=Cheers.
Tribioa at 2007-7-8 11:46:59 > top of Java-index,Java Essentials,New To Java...
# 6
If you are trying to write it yourself, check out http://java.sun.com/developer/technicalArticles/Programming/compression/Found it using google: http://www.google.be/search?hl=nl&q=java.util.zip+tutorial&meta=
Peetzorea at 2007-7-8 11:46:59 > top of Java-index,Java Essentials,New To Java...
# 7
sorry boss,i dont want Zip tool .just i want to know a simple java progaram that zips the two temporary files that may be any two files.ie it may be .txt files
manju@ba at 2007-7-8 11:46:59 > top of Java-index,Java Essentials,New To Java...
# 8

Do you want to write a part of it yourself or do you want us to prepare you a complete solution? I provided you with a link to Java's zipping tutorial. If you took the effort to read it, you'll know there is an example zip.java.

You can put the initialisation in your main, take what's in the for loop, put it into a function. I assume you can write a program that takes 2 command line parameters, and pass those params to your zip function and you've got it... That's how far I'll go for your solution!

Peetzorea at 2007-7-8 11:46:59 > top of Java-index,Java Essentials,New To Java...
# 9
Thank U boss,are u fromi got it
manju@ba at 2007-7-8 11:46:59 > top of Java-index,Java Essentials,New To Java...
# 10
Try to use java.util.zip.ZipFile class to work on this.
rajesh_cona at 2007-7-8 11:46:59 > top of Java-index,Java Essentials,New To Java...