package com.workspace4.test; import java.io.IOException; import java.util.jar.JarFile; import java.util.jar.Manifest; public class ReadManifestTest { /** * @param args */ public static void main(String[] args) { try { JarFile jf = new JarFile("d:/com.springsource.net.sf.cglib-2.1.3.jar"); Manifest mf = jf.getManifest(); System.out.println("Bundle-SymbolicName :" + mf.getMainAttributes().getValue("Bundle-SymbolicName")); } catch (IOException e) { e.printStackTrace(); } } } 备注: 本文转载自:http://huihua.javaeye.com/blog/349697 http://huihua.javaeye.com/blog/366951