define-simple-class and jars on the classpath?

Steve Smith tarka@internode.on.net
Sun Aug 27 05:24:00 GMT 2006


Hi,

I'm new to Kawa and I'm experimenting with defining classes that can
be used as plugins for java applications.  However I'm having trouble
inheriting from classes in jars not in the core java hierarchy, but on
the classpath.  To demonstrate this I'll use an Ant class...

The Ant jars are under /usr/share/java, so I've added them all to
CLASSPATH.  I know they're fine because I can define the following
java class and compile it:

    import org.apache.tools.ant.Task;
    public class AntTest extends Task {
    }

...

    # javac AntTest.java

This works; however if I try to define the equivalent simple-class it
fails:

    (define-simple-class <AntTest> (<org.apache.tools.ant.Task>)
    )
    
...

    # kawa -C AntTest.scm
    (compiling AntTest.scm)
    AntTest.scm:3:1: unknown super-type org.apache.tools.ant.Task

But inheriting from classes such as java.lang.Object works.  Can
someone point out what I'm missing?

Thanks,
Steve



More information about the Kawa mailing list