Hello,

I am trying to call a clips file, store a string in the clips file and
then fetch it in my java code. I get a null pointer exception when running
FetchVal.

Ryan

Java code
  import jess.*;
  public class FetchVal
  {
    public static void main(String[] unused) throws JessException
    {
      Rete r = new Rete();
      r.executeCommand("(batch store.clp)");
      Value v = r.fetch("xmlResult");
      System.out.println(v.stringValue(r.getGlobalContext()));

    }
  }

JESS code (store.clp)
(defglobal ?*Result* = (new java.lang.String))

(defrule initialize
 =>

 (bind ?*Result* "stuff")
 (store "Result" ?*Result*)
)




---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to