There are couple of ways to consume using Java.
The simplest and the recommended ways are ...
Invoking the Rule in a J2EE environment using IlrPOJOSessionFactory. All the details and code sample are provided in this link.
Invoking the Rule in a J2SE environment using IlrJ2SESessionFactory . All the details and code sample are provided in this link.
The Jar files you need to import are as follows.
- jrules-engine.jar
- jrules-res-XXXX-session-java.jar (XXXX - represent the version of the ILOG you are using)
- jrules-res-execution.jar
- jrules-res-session-XXXX.jar (XXXX - Represents the app server you are using websphere/weblogic etc..)
Spring framework also provide a JSR 94 template to invoke business rules deployed in RES from J2SE and J2EE component.