[Kaffe] Jacl now works with Kaffe!
Moses DeJong
dejong at cs.umn.edu
Wed Mar 10 17:13:37 PST 1999
Hi all.
With the most recent zip fixes in the CVS, I can now run
Jacl (Java Command Language, a Tcl implementation in Java)
with Kaffe. Many thanks to the Kaffe developers for helping
me to get this Java code running under Kaffe.
If you would like to try out this Tcl shell written in Java
you can download the source here:
http://www.cs.umn.edu/~dejong/tcl/tcljava/jacl1.2.1.tar.gz
You can also find out a bunch of info about the project
at these URLs.
http://www.scriptics.com/java
http://www.cs.umn.edu/~dejong/tcl/tcljava
Install Jacl like so.
tar -xzf jacl1.2.1.tar.gz
cd jacl1.2.1/unix
./configure --with-kaffe=YOUR_KAFFE_INSTALL_ROOT
make
You can then drop into a Jacl shell with "make shell"
and you can install using the jaclsh with "make install".
If you are developing Kaffe or you are porting Kaffe
to a new system you might want to download this package
because the package also comes with regression tests
for the JVM and Java libraries. These test are designed
to check the Jacl implementation but they have a side
effect of being a very good regression test for the
JVM and runtime libraries.
To run the regression tests type "make test". Some of
the test currently fail under Kaffe because of
unimplemented features Kaffe but you can ignore those.
You can also compile and run these tests under the JDK
to compare implementations.
Of course, the coolest feature of the Jacl package is
the ability to script Java code. Jacl uses the reflection
API to create a scripting tool where you can allocate
Java objects and call methods on them dynamically.
(Example Jacl code)
# This loads the java commands into the Tcl interp
package require java
# allocate java.util.Hashtable object
set hash [java::new java.util.Hashtable]
# add string keys to java.util.Hashtable
$hash put key1 val1
$hash put key2 val2
$hash put key3 val3
# print out the value for the key3 key
puts "key3 value is [$hash get key3]"
(output is "key3 value is val3")
Thanks again for all the help
Mo DeJong
dejong at cs.umn.edu
More information about the kaffe
mailing list