Skip to content

Instantly share code, notes, and snippets.

@f2prateek
Created January 20, 2015 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save f2prateek/c89ccdacdf58309617d8 to your computer and use it in GitHub Desktop.
Save f2prateek/c89ccdacdf58309617d8 to your computer and use it in GitHub Desktop.
Read classes in a Zipfile
try {
ZipFile zipFile = new ZipFile(jarFile);
for (Enumeration<? extends ZipEntry> entries = zipFile.entries();
entries.hasMoreElements(); ) {
String name = entries.nextElement().getName();
System.out.println("entry: " + name);
}
} catch (IOException e) {
throw new RuntimeException(e);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment