I think Olivier Causse wrote:
>
> The jess.Main class gives a neat initialization if one need a command line
> interface, embedded or not in a java program.
> In my case, I don't need a command line interface but I need to call several
> rete.executeCommand before starting the engine and then I call run command
> iteratively. So I guess a Main class won't be of any help for me in this case.
> I'd better initialize things like you do in Main.initialize() within my Java
> code.
> Is there any better solution ?
> Olivier Causse
>
I didn't explicitly state, but meant to imply, that you can use
Main.initialize() without using Main.execute(). That's why these are
separate machines. Use Main.initialize() to set up the Rete object,
then forget about the Main object altogether, and manipoulate the Rete
object directly from then on.
> Ernest Friedman-Hill wrote:
>
> > (facts) is now implemented in Jess code in the script library
> > (jess/scriptlib.clp). This is mentioned in the manual, but the manual
> > doesn't yet describe the need to load this library if you're embedding
> > Jess in your own Java program. See the method jess.Main.initialize()
> > for the current correct initialization sequence. You are encouraged to
> > use this class rather than cutting and pasting the code.
> >
> > new Main(new String[] {}, rete);
> >
> > gives you everything you do above, and more. One of the neat things
> > that Main.initialize() does is install an event handler so that if the
> > Rete engine executes (cl;ear),the script library is
> > reloaded. Otherwise it would make these functions (bing Jess
> > deffunctions) disappear.
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9214 [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. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------