You can add Java™ libraries
that are stored in a Rational® Asset Manager repository
to your Eclipse projects.
Before you begin
To reference a Java library,
you must have an existing Java project
in your current Eclipse workspace.
Procedure
To add a custom Java library
that is an artifact of an asset to a Java project:
- Find the asset that contains the Java library to use. Java libraries are typically .jar files.
You can find assets by searching and using filters and tags in the Asset
Search view. The Assets view
opens and lists your search results.
- Double-click the asset that contains the Java library to open it in the Asset Editor.
- Click Contents.
- On the Contents page, browse to the
library file to link to an Eclipse project.
- Right-click the file, and then:
- Click Link artifact to project.
A window that lists the projects in the current Eclipse workspace
opens.
- Select the project or folder where you want to place
the linked file.
- Optional: To recreate the directory structure
of the asset within the project folder that you selected, select Preserve
artifact paths.
- Click Next.
- Click Finish.
- In the Project Explorer view, right-click
the name of the Java project;
then, click Properties. The Properties window
opens.
- Click Java Build Path.
- In the Java Build
Path page, click the Libraries tab.
- Click Add JARs.
- In the JAR Selection window, select
the .jar file and then click OK.
- Repeat the previous steps for all of the library files
that you want to reference.
Results
The custom libraries that you are storing in Rational Asset Manager are
added to the build path for your project.