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)

Page: < 1 2

(Continued from page 1)

The execution of ZipFiles is shown below in the Console view:

Execution of ZipFiles

The file has been created at the root level of our project, as expected. file created

If we examine the contents of, we can see that the zip file that we created contains the expected files. contents viewed with WinZip
Page: < 1 2