I think mdean77 wrote: > shown). But the patient object already exists and can be accessed > by getPatient(), so I thought it would be more concise to use r.add > (getPatient());
Not only more concise, but semantically different. Adding a Java object to working memory is different from constructing a Fact from the same template. > This failed with a class not found error, so I added the > r.importClass statement. Nevertheless, I continue to receive a > class not found error. Ah, OK. Now we're getting somewhere. This is a problem with running inside an Eclipse plug-in; is that right (or maybe it's an RCP application?) So you've written a plug-in that uses the Jess plug-in? Note that the Eclipse platform is just about the most complex class-loading situation any human is ever likely to face. I think this is one of those cases where you have to help Jess because Jess can't figure things out on its own. Eclipse loads the classes from each plugin using a separate ClassLoader, and it doesn't provide a helpful context ClassLoader here, so Jess has no way by itself to access the ClassLoader that knows where to find your classes. This isn't really anything peculiar to Jess; any plugin that wanted to load classes by name from *your* plugin would run into the same issue. Anyway, Jess has a mechanism for dealing with this kind of problem. When you construct your Rete object, pass an instance of any object from your plugin as a constructor argument. Jess will then use the ClassLoader that loaded that object's class to find any other classes by name. --------------------------------------------------------- Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- 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] --------------------------------------------------------------------