posted 19 years ago
Hi,
Welcome to JavaRanch!
You can use the Rete.batch() method, which can read from a file in the filesystem or from a resource on the classpath. Or you can use the Jesp (Jess Parser) class directly, and parse rules and queries (and all other Jess code) from any java.io.Reader you provide.
You're probably asking, though, about somehow saying something like
Defrule rule = new Defule("rule-name", "comment");
rule.addPattern(...)
...
This is actually now possible in Jess 7 but the code to create a rule is long. Really, really long. And currently undocumented. So I wouldn't try it if I were you.