Working with Libraries

Use

In the process of developing applications, it is common that you use prefabricated functionality or components. Such used functionality is often packed into library that consists of JAR files, ready to be included into your application's classpath. Such library can provide:

  • Integral part of the project, common to many modules (applications)

  • Framework that you want to reuse and is not delivered with the application engine of your choice

In Java EE 5, there are two types of libraries:

  • Shared libraries

    These provide resources to all enterprise applications deployed on the server. They are packed in EAR files like the enterprise applications.

  • Bundled libraries

    These provide resources only to a single enterprise application, and are packed inside the application's EAR file.

Procedure

Using Shared Libraries

For more information, see Using Shared Libraries .

Using Bundled Libraries

For more information, Using Bundled Libraries .

Using Libraries with Highest Priority Class Loading

With heavy class loaders, you can load library classes with highest priority.

For more information, see Using Heavy Class Loaders .