ILOG JRules User Guide > Creating Rule Projects > Tasks > Setting Up a Rule Project > Defining the Execution Object Model > Defining a Java XOM

You can define a Java XOM in the New Rule Project wizard when you create the project, or later, using the rule project Properties dialog. The procedure is the same in each case.

To define a Java project using the Properties dialog:

  1. In the Rule Explorer view, select the rule project, then on the Project menu, click Properties.
  2. In the left pane of the Rule Project Properties dialog, click Java Execution Object Model.
  3. Select the Java project(s) required for the XOM from the list displayed. Use the Select All button if you want to select them all.
  4. Click OK.
  5. The Java XOM is now defined.

To add a JAR file or a class folder:

  1. In the Rule Explorer view, select the rule project, then on the Project menu, click Properties.
  2. In the left pane of the Rule Project Properties dialog, click Java Execution Object Model.
  3. Click the Libraries tab. The Libraries page enables you to choose JAR files and class folders.
  4. To add JAR files that have been imported in the Eclipse workspace, click Add JARs. This opens a dialog that enables you to browse JAR files in the workspace.
    To add JAR files that are not in the workspace, click Add External JARs. This opens a dialog that enables you to browse the JAR files in your file system.
    To add class folders, click Add Class Folder. This opens a dialog that enables you to browse directories in the workspace. In this same dialog, you can add external class folders by creating a folder in the workspace that you link to an external folder in the file system.
    Note
    By default, the JRE library is already in the list of libraries. This library is the same as the one used to run Eclipse and cannot be removed. You can browse the JRE library to see the JAR files used by this library.
  5. Click OK.

You now need to specify the location of the source to be used to reference a library.

To set a source location to reference a library:

  1. On the Libraries tab, expand the item you want to set as the source and select the Source item.
  2. Click Edit.
  3. This opens a dialog that enables you to select a ZIP file or a source folder from the workspace or your file system.

Java XOM entries can be ordered.

To order the entries:

  1. In the left pane of the Rule Project Properties dialog, click Java Execution Object Model.
  2. Click the Order tab.
  3. This page shows a list of all selected Java XOM entries.
  4. Select one or more entries and use the Up and Down buttons to move them.
  5. Click OK.

Related Concepts

Execution Object Model (XOM)

Related Tasks

Defining the Execution Object Model

Related Reference

New Rule Project Wizard
Rule Project Properties Dialog

Related Samples and Tutorials

Tutorial: Defining a Vocabulary