Shared libraries are installed separately and can be used by multiple applications. According to the Java EE specification, the libraries are represented by JAR files. They can reference other shared classes or resources packaged in a separate JAR file or directory, which are included in the same application package, or previously installed in the Java EE containers.
To use shared libraries, you have to deploy them as external applications, and set the appropriate class loader references to these libraries in the application-j2ee-engine.xml of the referencing applications.
...
1. Create an Enterprise Application project.
2. Select the project in the Project Explorer.
3. In the context menu, choose Properties → J2EE Module Dependencies.
4. Choose the library archives you want to add.
If you want to add JAR files located in the Developer Studio workspace, use Add JARs.
If you want to add JAR files located outside the workspace, use Add External JARs.
To use a shared library, set an application-to-application reference in the application-j2ee-engine.xml file of your application.
<application-j2ee-engine
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="application-j2ee-engine.xsd">
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="application">a1</reference-target>
</reference>
<fail-over-enable mode="disable" xsi:type="fail-over-enableType_disable"/>
<start-up mode="manual"/>
</application-j2ee-engine>
You are now ready to build and deploy your library component.