wiflish
Loving Life! Loving Coding!
posts - 98,comments - 98,trackbacks - 0
官方链接:JAR File Specification
MANIFEST.MF文件属性:

Main Attributes

Main attributes are the attributes that are present in the main section of the manifest. They fall into the following different groups:
  • general main attributes
    • Manifest-Version:
      Defines the manifest file version. The value is a legitimate version number, as described in the above spec.
       
    • Created-By:

    • Defines the version and the vendor of the java implementation on top of which this manifest file is generated. This attribute is generated by the jar tool.
       
    • Signature-Version:

    • Defines the signature version of the jar file. The value should be a valid version-number string.
       
    • Class-Path :

    • The value of this attribute specifies the relative URLs of the extensions or libraries that this application or extension needs. URLs are separated by one or more spaces. The application or extension class loader uses the value of this attribute to construct its internal search path.
       
  • attribute defined for stand-alone applications
  • This attribute is used by stand-alone applications that are bundled into executable jar files which can be invoked by the java runtime directly by running "java -jar x.jar".
    • Main-Class :

    • The value of this attribute defines the relative path of the main application class which the launcher will load at startup time. The value must not have the .class extension appended to the class name.
  • attributes defined for applets
  • These attributes is used by an applet which is bundled into JAR files to define requirements, version and location information for the extensions which this applet depends on. (see  Extension Versioning ). 
    • Extension-List:

    • This attribute indicates the extensions that are needed by the applet. Each extension listed in this attribute will have a set of additional attributes that the applet uses to specify which version and vendor of the extension it requires.
       
    • <extension>-Extension-Name :

    • This attribute is the unique name of the extension. The Java Plug-in will compare the value of this attribute with the Extension-Name attribute in the manifests of installed extensions to determine if the extension is installed.
       
    • <extension>-Specification-Version

    • This attribute specifies the minimum extension specification version that is required by the applet. The Java Plug-in will compare the value of this attribute with the Specification-Version attribute of the installed extension to determine if the extension is up to date.
       
    • <extension>-Implementation-Version

    • This attritute specifies the minimum extension implementation version number that is required by the applet. The Java Plug-in will compare the value of this attribute with the Implementation-Version attribute of the installed extension to see if a more recent implementation needs to be downloaded.
       
    • <extension>-Implementation-Vendor-Id

    • This attribute can be used to identify the vendor of an extension implementation if the applet requires an implementation from a specific vendor. The Java Plug-in will compare the value of this attribute with the Implementation-Vendor-Id attribute of the installed extension.
       
    • <extension>-Implementation-URL

    • This attribute specifies a URL that can be used to obtain the most recent version of the extension if the required version is not already installed.
       
  • attribute defined for extension identification
  • This attribute is used by extensions to define their unique identity.
    • Extension-Name:
    • This attribute specifies a name for the extension contained in the Jar file. The name should be a unique identifier such as the name of the main package comprising the extension.
     
  • attributes defined for extension and  package versioning  and sealing information
  • These attributes define features of the extension which the JAR file is a part of. The value of these attributes apply to all the packages in the JAR file, but can be overridden by per-entry attributes. 
    • Implementation-Title :
    • The value is a string that defines the title of the extension implementation. 
    • Implementation-Version :

    • The value is a string that defines the version of the extension implementation.
       
    • Implementation-Vendor :

    • The value is a string that defines the organization that maintains the extension implementation.
       
    • Implementation-Vendor-Id :

    • The value is a string id that uniquely defines the organization that maintains the  extension implementation.
       
    • Implementation-URL :

    • This attribute defines the URL from which the extension implementation can be downloaded from.
       
    •  Specification-Title :

    • The value is a string that defines the title of the extension specification.
       
    • Specification-Version :

    • The value is a string that defines the version of the extension specification.
       
    • Specification-Vendor :

    • The value is a string that defines the organization that maintains the extension specification.
    • Sealed :

    • This attribute defines whether this JAR file is sealed or not. The value can be either "true" or "false", case is ignored. If it is set to "true", then all the packages in the JAR file are defaulted to be sealed, unless they are defined otherwise individually.

posted on 2006-07-05 10:09 想飞的鱼 阅读(839) 评论(0)  编辑  收藏 所属分类: java

只有注册用户登录后才能发表评论。


网站导航: