WebSphere Message Brokers
File: ac30280_
Writer: Catherine Tucker

Task topic

This build: July 31, 2007 21:20:07

Adding Java code dependencies

When you write your Java code for a JavaCompute node, you can include references to other Java projects and JAR files.

Before you start

To complete this task, you must have completed the following tasks:

The Java code in a JavaCompute node might contain references to other Java projects in your Eclipse workspace (internal dependencies), or to external JAR files, for example the JavaMail API (external dependencies). If other JAR files are referenced, you must add the files to the project class path.

  1. Right-click the project folder of the project that you are working on and click Properties.
  2. Click Java Build Path on the left pane.
  3. Click the Libraries tab.
  4. Perform one of the following steps:
    • To add an internal dependency, click Add JARs..., select the JAR file that you want to add then click OK.
    • To add an external dependency, click Add External JARs..., select the JAR file that you want to add, then click Open. Copy the file to WorkPath/shared-classes where WorkPath is the full path to the working directory of the broker. If you do not copy the external dependencies here ClassNotFoundException exceptions are generated at run time.
    Tip:
    The default value for WorkPath is one of the following values:
    • Windows platform For Windows systems, the default workpath is c:\Documents and Settings\All Users\Application Data\IBM\MQSI.
    • UNIX platform For UNIX systems, the default workpath is /var/mqsi.
    • Linux platform For Linux systems, the default workpath is /var/mqsi.

    You have now added a code dependency.

Related tasks
Managing Java Files
Writing Java
Changing the location of the work path for WebSphere Message Broker
Related reference
JavaCompute node
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:20:07

ac30280_ This topic's URL is: