This article applies to the BlackBerry® wireless devices based on Java™.
A library is a project that enables objects and methods to be used in other projects. Using libraries is a good way to write applications that are both modular and reusable. For example, if you write a custom field or custom manager that you want to use in several programs, you could implement these custom objects in a library project and use them in many other projects, having only written the code once.
To mark a project as a library, complete the following:
Right-click the project and click Properties.
On the Application tab, in the Project Type drop-down list, select Library.
If you want to use this library in another project, the library must be located in the same workspace as the project in which you want to use it.
Right-click the project in which you want to use the Library and click Dependencies.
The libraries that exist in the workspace appear beside check boxes. Select each of the libraries on which your application depends to run. If you attempt to use a library that has not been set as a dependency, a ClassNotFound exception occurs during compilation.