Here you can find the source of createManifest(Map
public static Manifest createManifest(Map<String, String> customFields)
//package com.java2s; //License from project: Apache License import java.util.Map; import java.util.jar.Attributes; import java.util.jar.Manifest; public class Main { public static Manifest createManifest(Map<String, String> customFields) { Manifest manifest = new Manifest(); manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0"); for (String key : customFields.keySet()) { manifest.getMainAttributes().putValue(key, customFields.get(key)); }/*from w w w. j av a 2 s .c o m*/ return manifest; } }