This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Problem with invoke with method determined at runtime
Aha! Thanks very much!
So what I'm after really is:
test.scm containing:
(define-simple-class TestClass ()
((test (arg :: int)) :: void
(java.lang.System:out:format "test %d\n" arg)))
(let ((t ::TestClass (TestClass))
(method 'test))
(invoke t 'test 1)
(invoke t method 2))
Then compiling and running with:
kawa --main -C test.scm && java -classpath /usr/local/share/java/kawa.jar:. test
Brilliant. Thanks!
:)
On 7 January 2012 20:28, Per Bothner <per@bothner.com> wrote:
> On 01/07/2012 12:22 PM, Bill Robinson wrote:
>>
>> $ /usr/local/bin/kawa -C test.scm&& ?java -classpath
>>
>> /usr/local/share/java/kawa.jar:. Test
>> (compiling test.scm to test)
>> test 1
>
>
> You have to do:
> /usr/local/share/java/kawa.jar:. test
>
> I.e. run the module class 'test' - otherwise things may
> not be initialized properly.
>
> --
> ? ? ? ?--Per Bothner
> per@bothner.com ? http://per.bothner.com/