Listing the Contents of a ZIP File
import java.util.Enumeration; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; public class Main { public static void main(String[] argv) throws Exception { ZipFile zf = new ZipFile("filename.zip"); for (Enumeration entries = zf.entries(); entries.hasMoreElements();) { String zipEntryName = ((ZipEntry) entries.nextElement()).getName(); } } }