I'm reading your question to be "How do I get Jess to read an
'internal file' of Jess code?" In other words, you have a big String,
like the contents of a file, and you want Jess to read it all without
writing it into a file.

The Jess parser class is jess.Jesp. Basically, you'll need to
construct a Jesp object yourself and feed it the data - you could use
a java.io.StringReader. Broadly, it would be something like

        StringReader s = new StringReader(myStringOfCommands);
        Rete r = new Rete();
        Jesp j = new Jesp(s, r);
        do {
          j.parse(false);
        while(s.ready());

I've left out error handling and other niceties, but this is basically
it.


I think chinnaswamy gounder wrote:
> Hi all,
>         We do have two ways of referring the rules to
> Rete object. 
> 
>     1. rete_object.executeCommand (" rule stirng " ) 
> 
> and 2. rete_object.exceutrCommand (" ( batch  x.clp)")
> 
> Can we combine all the rules of the  file x.clp in a
> string and refer to a Rete object?
> 
>     Thanks and regards.
> 
> 
>     Chinnaswamy
> 



---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

---------------------------------------------------------------------
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