Here you can find the source of getManifestHeaders(File aJarFile)
public static Properties getManifestHeaders(File aJarFile) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.IOException; import java.io.InputStream; import java.util.Properties; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; public class Main { public static Properties getManifestHeaders(File aJarFile) throws IOException { ZipFile zipFile = new ZipFile(aJarFile); Properties properties = new Properties(); try {/* w ww . j a v a 2 s .co m*/ ZipEntry zipEntry = zipFile.getEntry("META-INF/MANIFEST.MF"); InputStream is = zipFile.getInputStream(zipEntry); properties.load(is); is.close(); } catch (Throwable t) { } zipFile.close(); return properties; } }