java.io.File file = new java.io.File("/Drivers/h2/h2-1.3.162.jar");
java.util.jar.JarFile jar = new javaxt.io.Jar(file);
java.util.jar.Manifest manifest = jar.getManifest();
System.out.println("\r\nMain Attributes:\r\n--------------------------");
printAttributes(manifest.getMainAttributes());
System.out.println("\r\nOther Attributes:\r\n--------------------------");
java.util.Map<String, java.util.jar.Attributes> entries = manifest.getEntries();
java.util.Iterator<String> it = entries.keySet().iterator();
while (it.hasNext()){
String key = it.next();
printAttributes(entries.get(key));
System.out.println();
}
jar.close();
private static void printAttributes(java.util.jar.Attributes attributes){
java.util.Iterator it = attributes.keySet().iterator();
while (it.hasNext()){
java.util.jar.Attributes.Name key = (java.util.jar.Attributes.Name) it.next();
Object value = attributes.get(key);
System.out.println(key + ": " + value);
}
}