This topic applies only to the IBM Business Automation Workflow Advanced
configuration.

Adding a Java Archive (JAR) file to a module

Draft comment:
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-01-20 10:38
Draft comment:
This topic was viewed 114 times since its publication
You can add a JAR file to a module, mediation module, or library by copying it from the file system into a project in the Business Integration view.

About this task

To add a JAR file to a module, mediation module, or library:

Procedure

  1. Choose one of the following actions depending on whether the JAR file will only be used with one module or library or will be shared in multiple modules.
    • If the JAR file will be used in only one module, mediation module, or library, copy the file into a module, mediation module, or library in the Business Integration view.
    • If the JAR file will be used in multiple modules, mediation modules, or library, share the JAR file by wrapping it in a Java™ project so that many libraries and modules can use the same JAR file at development time. The next step shows you how to share the JAR file.
  2. Optional: Set up dependencies from other modules or libraries to the Java project. Use this approach if you want to allow many libraries and modules to use the same JAR file at development time.
    1. Create a Java project.
    2. Copy the JAR file into the Java project.
    3. Set up the Java build path of the Java project to contain this JAR file.
    4. Open the dependency editor from the module or library.
    5. Add the Java project in the Java section of the dependencies.
      Note: Do not change the Java dependencies for modules and libraries outside of the dependency editor.
    6. Make sure that the Deploy with module or Deploy with library check box is selected.

    During deployment, the Java project will be deployed with the module.

Results

You can now use a class from the JAR file in a number of different ways. For example, you can call it from Java component implementations or from Java snippets associated with the various kinds of artifacts.