Here you can find the source of processJarFile(String f)
public static void processJarFile(String f)
//package com.java2s; /*//from w w w . java 2 s . c o m * (C) 2007-2012 Alibaba Group Holding Limited. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * Authors: * leiwen <chrisredfield1985@126.com> , boyan <killme2008@gmail.com> */ import java.util.Enumeration; import java.util.jar.JarEntry; import java.util.jar.JarFile; public class Main { public static void processJarFile(String f) { try { JarFile jarF = new JarFile(f); Enumeration<JarEntry> je = jarF.entries(); while (je.hasMoreElements()) { JarEntry entry = je.nextElement(); String name = entry.getName(); long size = entry.getSize(); long compressedSize = entry.getCompressedSize(); } } catch (Exception e) { e.printStackTrace(); } } }