List files in a jar file
import java.io.*; import java.util.*; import java.util.jar.*; public class JarDir { public static void main (String args[]) throws IOException { JarFile jarFile = new JarFile("yourJarFileName.jar"); Enumeration enum = jarFile.entries(); while (enum.hasMoreElements()) { process(enum.nextElement()); } } private static void process(Object obj) { JarEntry entry = (JarEntry)obj; String name = entry.getName(); long size = entry.getSize(); long compressedSize = entry.getCompressedSize(); System.out.println( name + "\t" + size + "\t" + compressedSize); } }