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:
-
In the Rule Explorer view, select the rule project, then on the Project menu, click Properties.
-
In the left pane of the Rule Project Properties dialog, click Java Execution Object Model.
-
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.
-
Click OK.
The Java XOM is now defined.
To add a JAR file or a class folder:
-
In the Rule Explorer view, select the rule project, then on the Project menu, click Properties.
-
In the left pane of the Rule Project Properties dialog, click Java Execution Object Model.
-
Click the Libraries tab. The Libraries page enables you to choose JAR files and class folders.
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.
|
-
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:
-
On the Libraries tab, expand the item you want to set as the source and select the Source item.
-
Click Edit.
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:
-
In the left pane of the Rule Project Properties dialog, click Java Execution Object Model.
-
Click the Order tab.
This page shows a list of all selected Java XOM entries.
-
Select one or more entries and use the Up and Down buttons to move them.
-
Click OK.
Related Concepts
Related Tasks
Related Reference
Related Samples and Tutorials