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]

More module problems


Hi,

I'm still having trouble getting kawa-generated classes to run in java. I
have a small .scm file:

(module-export Adder) 
(define (Adder x) (+ 5 x))

I compile it using the latest kawa release (just installed!), and I get 2
files: Adder.class and Adder$Adder.class. I add these files to my
Codewarrior project, plus the kawa 1.7 .jar file. I have a simple java
source file to test the Adder class:

public class TrivialApplication {

        public static void main(String args[]) {
        		Adder test = new Adder();
        		System.out.println( test.run( 5 ) );

        }
}

I noticed in the class browser that the method in the Adder class is
called "run". (I don't understand why it is not called "Adder"?) hence
test.run(). I get the following error at compile-time:

Error : Wrong number of arguments in method. TrivialApplication.java line
6 System.out.println( test.run( 5 ) );

This seems to disagree with the definition of the method Adder in the
class file. Can anyone help me?

Thanks,

Simon.

S. P. Blomberg 
Dept of Zoology
University of Aberdeen 
Aberdeen, AB24 2TZ, UK. s.blomberg@abdn.ac.uk


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