This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: calling scheme from java
- From: Per Bothner <per at bothner dot com>
- To: "Hurst, Dave" <DHurst at lisletech dot com>
- Cc: "'kawa at sources dot redhat dot com'" <kawa at sources dot redhat dot com>
- Date: Thu, 03 Aug 2006 10:44:51 -0700
- Subject: Re: calling scheme from java
- References: <9E8A844656C6D9119A780060B0A3897E2A7060@arcturus.lisletech.com>
Hurst, Dave wrote:
Is it possible to call Scheme functions from Java so that I can pass Java
objects as arguments to the function? Evaluating a Scheme expression using
Scheme.eval() won't work because there's no way to pass a Java object
through a string containing a Scheme expression.
For example, suppose I have a function defined like this:
(define (my-func collection :: <java.util.Collection>)
... do something with collection ... )
I would like to call my-func from Java and pass it a Collection instance.
Scheme.eval("my-func", env).apply1(my_collection)
--
--Per Bothner
per@bothner.com http://per.bothner.com/