我在 java 程序中运行 jess 时遇到错误,如错误:包 jess 不存在我不知道要包含什么和所有包。
我写过这样的代码:
import jess.*;
public class ExQuery {
public static void main(String[] argv) throws JessException {
Rete engine = new Rete();
engine.batch("query.clp");
engine.reset();
QueryResult result =
engine.runQueryStar("search-by-name", new ValueVector().add("Smith"));
while (result.next()) {
System.out.println(result.getString("fn") + " " + result.getString("ln")
+ ", age" + result.getInt("age"));
}
}
}