Running and debugging Java applications with rules

You can run a Java™ project with rules as a Java application with rules.

About this task

When running a Java application with rules, you automatically create the ruleset archive before running the Java project by specifying the rule project, the extractor, and the location of the ruleset archive to build. You must use this configuration when you have developed a Java project that loads a ruleset archive and executes it.
Restriction: The Running a Java Application with Rules launch configurations are not supported with decision services.

When a rule is debugged, Rule Designer tries to show the file containing the rule to highlight the position where the debugger is stopped. The debugger has a lookup path to find this rule file. You specify this path in the Rule Source Path tab.

You cannot debug a ruleset and a Java application at the same time without using Rule Designer. However, it is still possible to use another integrated development environment to write the Java code and build the application.

To test the rules inside a classic rule project and the Java project that calls the rule engine, use the Debugger launch configuration for a Java application with rules.

Note:
Because of Sun and IBM® JDK limitations, Eclipse cannot run nor debug launch configurations on projects that contain Japanese, Korean, simplified Chinese, or GB18030 characters. To work around this issue, take either of the following actions:
  • Use a localized Windows operating system. For example, Windows localized in Japanese.

  • Use an international Windows operating system and change the Regional and Language Options to your required locale. For example, Japanese.

Procedure

To run a Java project with rules as a Java application with rules:

On the Run menu, click Run As  > Java Application with Rules.

Results

A launch configuration is created.