Packaging resources that include Java code or message sets

Compile Java™ code and message sets so that you can add them to a BAR file.

About this task

You can use the mqsipackagebar command to create BAR files on computers that do not have IBM® Integration Toolkit installed. This command adds only deployable resources to the BAR file, so if you want to add message sets or Java code you must first compile them to create deployable resources. For more information about the mqsipackagebar command, see mqsipackagebar command.

You can compile resources by using the mqsicreatebar command, or by using the IBM Integration Toolkit. If you use the IBM Integration Toolkit, you can either compile resources in the current workspace or you can compile resources in selected projects.

If you want to use the mqsipackagebar command to create BAR files from source files that are stored in a version control system, use one of the following processes to ensure that your message sets and Java code are compiled before you create a BAR file:
  • Use the mqsicreatebar command to compile message sets and Java code that are stored in the version control system. You might use this command as part of an automated process.
  • Ensure that your message sets and Java code are compiled before you add them to the version control system by using the IBM Integration Toolkit.

Procedure

To compile your message sets and Java code, complete one of the following steps:

  • To compile message sets and Java code by using the mqsicreatebar command, complete the following steps. For more information about the mqsicreatebar command, see mqsicreatebar command.
    1. Open a command window that is configured for your environment.
    2. Enter the following command:
      mqsicreatebar -data workspace -compileOnly
      where workspace is the fully qualified path to the workspace that contains the message set projects or Java projects that you want to compile.
      Your message sets are compiled into .dictionary, or .xsdzip files. Your Java code is compiled into .jar files.
  • To compile all message sets and Java code in the current workspace by using the IBM Integration Toolkit, complete the following steps:
    1. Click Project > Build for mqsipackagebar.
      The Build Information window shows the directories in which the compiled resources are created. Your message sets are compiled into .dictionary, or .xsdzip files. Your Java code is compiled into .jar files.
    2. Click OK.
  • To compile message sets and Java code in selected projects by using the IBM Integration Toolkit, complete the following steps:
    1. In the Application Development view, right-click the message set project or Java project that you want to compile. Click Build for mqsipackagebar.
      The Build Information window shows the directories in which the compiled resources are created. Your message sets are compiled into .dictionary, or .xsdzip files. Your Java code is compiled into .jar files.
    2. Click OK.

What to do next

Run the mqsipackagebar command to create your BAR file, see Creating a BAR file.