Here you can find the source of getManifest(String path)
private static Manifest getManifest(String path) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.IOException; import java.util.jar.JarFile; import java.util.jar.Manifest; public class Main { private static Manifest getManifest(String path) throws IOException { File jar = new File(path); JarFile jf = new JarFile(new File(path)); Manifest mf = new JarFile(jar).getManifest(); jf.close();/*from w w w . ja v a 2s. c om*/ return mf; } }