Here you can find the source of loadManifestFrom(Class> c)
static Manifest loadManifestFrom(Class<?> c) throws ClassNotFoundException, IOException
//package com.java2s; //License from project: Apache License import java.io.IOException; import java.net.URL; import java.net.URLClassLoader; import java.util.jar.Manifest; public class Main { static Manifest loadManifestFrom(Class<?> c) throws ClassNotFoundException, IOException { URLClassLoader cl = (URLClassLoader) c.getClassLoader(); URL url = cl.findResource("META-INF/MANIFEST.MF"); Manifest manifest = new Manifest(url.openStream()); return manifest; }//from ww w . j av a2s .c o m static Manifest loadManifestFrom(String cn) throws ClassNotFoundException, IOException { return loadManifestFrom(Class.forName(cn)); } }