Problem with define-java-proxy

Dominique Boucher <[email protected]>
Newsgroups gmane.comp.java.sisc.user
Message-ID <[email protected]>
Hi,

I've just started experimenting with the Scheme<->Java interface (s2j) 
using SISC 1.13.6. I did the following:

(import s2j)
(define-java-class <java.lang.runnable>)
(define-java-proxy (runnable thunk)
  (<java.lang.runnable>)
  (define run
    (lambda ()
      (thunk)
      (void))))

(define-generic-java-methods run)

When I evaluate the expression:

(run (runnable (lambda () (display "Hi!") (newline))))

I get the following error:

Error: #<java java.lang.reflect.UndeclaredThrowableException 
java.lang.reflect.UndeclaredThrowableException>
?:?:?: <from call to @s2j-operation::java/invoke-method>

I tried the example in the documentation (with a Comparator), and it 
works fine.

Any idea?

Thanks in advance,

Dominique


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.