Here you can find the source of getManifest(String className)
Parameter | Description |
---|---|
className | name of the class containing the main of the application. If the class is "Main.class" in the package "org.main", then the className is "org.main.Main". |
public static Manifest getManifest(String className)
//package com.java2s; //License from project: Open Source License import java.util.jar.Manifest; import java.util.jar.Attributes; public class Main { /**//from w w w . ja va2 s. c o m *Return a Manifest which indicate the parameter as the class containing the main of the application. *@param className name of the class containing the main of the application. If the class is "Main.class" in the package "org.main", then the className is "org.main.Main". *@return Manifest which indicate the main */ public static Manifest getManifest(String className) { Manifest mf = new Manifest(); mf.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0"); mf.getMainAttributes().put(new Attributes.Name("Built-By"), "Sonet Nicolas"); mf.getMainAttributes().put(new Attributes.Name("Created-By"), "Sonet Nicolas"); mf.getMainAttributes().put(Attributes.Name.MAIN_CLASS, className); return mf; } }