ILOG JRules User Guide > Executing Rules > Tasks > Executing a Ruleset Using a Native Rule Engine > Creating a Java Project for Rules

To execute a ruleset using an instance of a rule engine, you must first create a Java project for your rules.

To create a Java project for rules:

  1. On the File menu, click New > Project.
  2. In the New Project wizard, select Java Project for Rules.
  3. Click Next.
  4. In the Java Project for Rules page, specify the name and location of your rule project:
    1. Type a name for your project in the Project name field.
    2. If you want the project to be saved in your Eclipse workspace, keep the Use default box selected.
    3. If you want to save your project in a different location, clear the Use default box, and browse to select the directory of your choice in the Location field.
  5. Click Next.
  6. In the Java Project for Rules Settings page, specify the rule project that provides the ruleset for the Java project for rules, then click Next.
  7. In the Java Project for Rules Templates page, specify the template you want to use to generate the main class of the Java project. The following templates are available:
    1. Simple Rule Engine Runner: Generates a simple class to execute a ruleset.
    2. Rule Engine Runner: Generates a class to execute a ruleset with parameters and provides debug handling.
    3. Rule Engine Runner Test Case: Generates a class to execute a ruleset with parameters. The generated class is packaged as a JUnit test.
  8. Click Finish.
  9. When prompted to switch to the Java Perspective, click Yes.

Related Concepts

Rule Project

Related Tasks

Setting Up a Rule Project
Setting the Classpath to Contain the XOM and the Rule Engine
Writing a Ruleset Execution Method

Related Samples and Tutorials

Rule Engine Integration