Hi Eric,
Note that Rete.batch() (as well as all the variations available in the
jess.Batch class, see http://www.jessrules.com/jess/docs/71/api/jess/Batch.html
) will actually fall back to using ClassLoader.getResourceAsStream()
on the classpath. I know Eclipse's class loading is pretty complex,
but you might just try and see if batch can find your files inside
your jars.
For the general solution, check out http://www.jessrules.com/jess/docs/71/library.html#jess.Jesp
:
import jess.Jesp;
...
Reader aReader = ...
Jesp parser = new Jesp(aReader, engine);
parser.parse(false);
On Mar 11, 2009, at 3:34 PM, Widhalm, Eric - Fort Collins, CO wrote:
I'm using the 30-day trial of Jess, and have already run into a
problem:
Is there no engine.batch(InputStream) or equivalent for loading rule
sets? We have to deliver our *.clp files in eclipse plugins, and
can only access them by finding them in the Bundle and opening an
input stream. I can read the stream and create a temporary file,
then blow away the file after loading the engine, but having to do
that is pretty dumb (and slow).
engine.batch(String) would be convenient as well.
How does everyone else do this? Surely not everyone reads from a
file *always*??
-Eric
---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences Phone: (925) 294-2154
Sandia National Labs
PO Box 969, MS 9012 [email protected]
Livermore, CA 94550 http://www.jessrules.com
--------------------------------------------------------------------
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].
--------------------------------------------------------------------