IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Advanced development topics > Adding Java to the application
Adding a Java Archive (JAR) file to a module
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.
To add a JAR file to a module, mediation module, or library:
Procedure
- 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.
- 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.
- Create a Java project.
- Copy the JAR file into the Java project.
- Set up the Java build path of the Java project to contain this JAR file.
- Open the dependency editor from the module or library.
- Add the Java project in the Java section of the dependencies.
Do not change the Java dependencies for modules and libraries outside of the dependency editor.
- Verify 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.