Referencing Java library artifacts in Eclipse projects

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:

  1. 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.
  2. Double-click the asset that contains the Java library to open it in the Asset Editor.
  3. Click Contents.
  4. On the Contents page, browse to the library file to link to an Eclipse project.
  5. Right-click the file, and then:
    1. Click Link artifact to project. A window that lists the projects in the current Eclipse workspace opens.
    2. Select the project or folder where you want to place the linked file.
    3. Optional: To recreate the directory structure of the asset within the project folder that you selected, select Preserve artifact paths.
    4. Click Next.
    5. Click Finish.
  6. In the Project Explorer view, right-click the name of the Java project; then, click Properties. The Properties window opens.
  7. Click Java Build Path.
  8. In the Java Build Path page, click the Libraries tab.
  9. Click Add JARs.
  10. In the JAR Selection window, select the .jar file and then click OK.
  11. 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.


Feedback