This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Newbie question
- From: "Julian Simo" <julian dot simo at gmail dot com>
- To: kawa at sources dot redhat dot com
- Date: Fri, 22 Feb 2008 17:07:05 -0300
- Subject: Newbie question
Hello listers,
I was trying Kawa because I liked the idea of accessing Java inside
Scheme. I wrote a litlle program to see how Kawa worked and I got
stuck with a problem that appeared when trying to byte-compile. The
*program* is like this
(define-namespace jswing "class:javax.swing.JFrame")
(set! window (make jswing))
(window:setSize 400 200)
(window:setVisible 't)
and it runs smoothly under the repl. But, if I try
[@ ~]$ kawa --main -C test.scm
it will produce the following error messages
(compiling test.scm to test)
test.scm:3:1: warning - no known slot 'setSize' in java.lang.Object
test.scm:4:1: warning - no known slot 'setVisible' in java.lang.Object
and then, when I try to run
[@ ~]$ java test
Exception in thread "main" java.lang.NoClassDefFoundError: test
Now, I am using Mac OS X (10.5) with Java 1.5
[@ ~]$ java -version
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)
and I downloaded and compiled kawa from its website. I had the same
problem when I tried the .jar version supplied there. Is this a real
problem or a naive mistake?
--
Julian