private void unzip(File src, File dest) { Project dummyProject = new Project(); dummyProject.init(); Expand antUnzip = new Expand(); antUnzip.setProject(dummyProject); antUnzip.setSrc(src); antUnzip.setDest(dest); antUnzip.execute(); // ant doesn't preserve permission bits // need to restore them manually Chmod chmod = new Chmod(); chmod.setProject(dummyProject); chmod.setDir(new File(src.getAbsolutePath().replaceAll(".zip", ""))); chmod.setPerm("a+rx"); chmod.setIncludes("**/**"); chmod.execute(); }