How can I create a zip file from a set of files?
Author: Deron Eriksson
Description: This Java tutorial describes how to create a zip file from a set of files.
Tutorial created using: Windows XP || JDK 1.5.0_09 || Eclipse Web Tools Platform 2.0 (Eclipse 3.3.0)
(Continued from page 1)
The execution of ZipFiles is shown below in the Console view:
The atest.zip file has been created at the root level of our project, as expected.
If we examine the contents of atest.zip, we can see that the zip file that we created contains the expected files.