You can using existing JAR files in the Web application that you are developing.
You can have APIs that need to be accessed at design time (for example, by a custom builder). Or you can have a JAR (for example, from third-party software) that you need to reference from a builder generation or builder coordinator class.
- Add a copy of the JAR to one of the following WebSphere® Portlet Factory project directories.
In Eclipse Project Explorer, right-click the WebSphere Portlet Factory project and click Properties -> Java Build Path.
In the Properties for your project dialog, click Libraries.
- WEB-INF/lib or WEB-INF/work/lib
The WEB-INF/lib and WEB-INF/work/lib directories are used at runtime on the application, portal server, or mashup. The JARs in these directories are dynamically loaded by WebSphere Portlet Factory. This is convenient during development.
If you need a JAR in your project just for compilation or design time access and the JAR is already available on your application, portal server, or mashup, put that JAR in WEB-INF/clientLibs. This directory is primarily used for compilation against APIs that already are available on the application server. No classes from WEB-INF/clientLibs are loaded and used at runtime on the server. The directory is a safe place to put application server JARs that you need to compile against.
A display shows a list of JAR files currently in the project Java Build Path.
Click one of the following buttons:
In the JAR Selection dialog, navigate to the appropriate directory and select the JAR to add to the project.
Click OK in the JAR Selection dialog.
Click OK in the Properties dialog.
- Add JARs if the JAR is within your project structure
- Add External JARs if the JAR is located outside your project structure
Parent topic: Configuring IBM WebSphere Portlet Factory