Installed optional packages

Installed optional packages enable applications to use the classes in Java archive (.jar) files without having to include them explicitly in a class path. An installed optional package is a .jar file containing specialized tags in its manifest file that enable the application server to identify it. An installed optional package declares one or more shared library .jar files in the manifest file of an application. When the application is installed on a server or cluster, the classes represented by the shared libraries are loaded in the class loader of the application, making the classes available to the application.

When a J2EE application is installed on a server or cluster, dependency information is specified in its manifest file. WebSphere Application Server reads the dependency information of the application (.ear file) to automatically associate the application with an installed optional package .jar file. WebSphere Application Server adds the .jar files in associated optional packages to the application class path. Classes in the installed optional packages are then available to application classes.

Installed optional packages used by WAS are described in section 8.2 of the J2EE specification, V1.4 at

WebSphere Application Server supports using the manifest file ( in shared library .jar files and application .ear files. WebSphere Application Server does not support the Java 2 Platform Standard Edition (J2SE) Installed Optional Package semantics used in the J2SE specification (, which primarily serve the applet environment. WebSphere Application Server ignores applet-specific tags within manifest files.


Sample file

A sample manifest file follows for an application app1.ear that refers to a single shared library file util.jar:

             Extension-List: util
             util-Extension-Name: com/example/util
             util-Specification-Version: 1.4

        Extension-Name: com/example/util
        Specification-Title:'s util package
        Specification-Version: 1.4
        Implementation-Version: build96

The syntax of a manifest entry depends on whether the entry applies to a member with a defining role (the shared library) or a member with a referencing role (a J2EE application or a module within a J2EE application).


Manifest entry tagging

Main tags used for manifest entries include the following:


A required tag with variable syntax. Within the context of the referencing role (application's manifest), this is a space delimited list that identifies and constructs unique Extension-Name, Extension-Specification tags for each element in the list. Within the context of the defining role (shared library), this tag is not valid.


A required tag that provides a name and links the defining and referencing members. The syntax of the element within the referencing role is to prefix the element with the <ListElement> string. For each element in the Extension-List, there is a corresponding <ListElement>-Extension-Name tag. The defining string literal value for this tag (in the above sample com/example/util1) is used to match (in an equality test) the corresponding tags between the defining and referencing roles.


A required tag that identifies the specification version and links the defining and referencing members.


An optional tag that identifies the implementation version and links the defining and referencing members.

Further information on these tags is in the .jar file specification at


See Also

Class loaders


Related Tasks

Using installed optional packages
Manage shared libraries




WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.