Problem with output JESS NETBEAN

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem with output JESS NETBEAN

babolatjess
This post has NOT been accepted by the mailing list yet.
hello es anyone of you knows how to get the result generated by jess and put on a WRITER
I tried too much stuff and it did not work (I'm stuck)

Writer os = new StringWriter();
engine.addOutputRouter("t",os);
System.out.println(os.toString());
os rest empty

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Rete engine = new Rete();

try {

engine.batch(nom);

THANK YOU

engine.executeCommand("(reset)");

engine.executeCommand("(assert (fait mo ))");

Writer os = new StringWriter();
engine.addOutputRouter("t",os);

System.out.println(os.toString());
engine.executeCommand("run");

}
catch (JessException je) {
System.out.println("2:" + je.getMessage());

}
Loading...