Source Code : Listing the Main Attributes in a JAR File Manifest
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
Listing the Main Attributes in a JAR File Manifest
import java.util.Iterator;
import java.util.jar.Attributes;
import java.util.jar.JarFile;
import java.util.jar.Manifest;
public class Main {
public static void main(String[] argv) throws Exception {
JarFile jarfile = new JarFile("filename.jar");
Manifest manifest = jarfile.getManifest();
Attributes attrs = (Attributes) manifest.getMainAttributes();
for (Iterator it = attrs.keySet().iterator(); it.hasNext();) {
Attributes.Name attrName = (Attributes.Name) it.next();
String attrValue = attrs.getValue(attrName);
}
}
}
Thank with us