Code example for Manifest

Methods: getMainAttributes, read

0
        System.out.println(msg);
 
        System.out.println("\nVerify Generated MANIFEST.MF Properties" );
 
		// Check Manifest file based on generated build number 
        Manifest mf = new Manifest();
        mf.read(Thread.currentThread().getContextClassLoader().getResourceAsStream("META-INF/MANIFEST.MF"));
 
        Attributes atts = mf.getMainAttributes();
 
        System.out.println("Implementation-Versio: " + atts.getValue("Implementation-Version"));
        System.out.println("Implementation-Build: " + atts.getValue("Implementation-Build"));
    } 
}