This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Java rule engine with rules expressed in Scheme


Bhinderwala, Shoeb wrote:


Specifically, lets say I have a scheme script called test.scm.
How do I load this script from Java.

You could load it using kawa.standard.load.loadSource.


If it is fixed, you could compile it to bytecode, and just reference it like any other Java class. (If you compile with --module-static, then running the class initializer, such as done by Class.forName, will load the top-level definitions.)

After loading it, I want
to create my Java business object Security assigned to variable
mySecurity. Then I want to invoke a procedure in test.scm.
How do I access the business object I created (in Java code) inside the procedure in test.scm?

You could pass the business object as a function parameter. -- --Per Bothner per@bothner.com http://per.bothner.com/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]