Hello fellow java-linux users.

I have been working on an open source project that provides a
way to combine Java and the Tcl scripting languages using the
java reflection APIs. I was hoping I could get some help
testing the code to make sure it works on a number of linux
systems. To make a long story short, the code configures and
compiles on Linux (I was using RedHat 5.2) and it works for me
but I fear it may not work on some other systems. I was
wondering if some of you folks might want to try it out on
your Linux system and tell my if it works for you too.
The code requires the JDK1.1.7v1a from blackdown with the
native threads pack as it uses JNI. In case you are interested
here is how you can download and install the code.


1. Download Tcl 8.0.4 from ftp.scriptics.com

ftp://ftp.scriptics.com/pub/tcl/tcl8_0/tcl8.0.4.tar.gz

2. configure and compile Tcl

tar -xzf tcl8.0.4.tar.gz
cd tcl8.0.4/unix
./configure --enable-gcc --enable-shared
make


2. Download the Tcl/Java package (AKA Tcl Blend and Jacl)

http://www.cs.umn.edu/~dejong/tcl/tcljava1.1b1.tar.gz

tar -xzf tcljava1.1b1.tar.gz
cd tcljava1.1b1/unix
(make sure javac is in your PATH before running configure)
./configure
make shell


Then type this into the shell that comes up.

% package require java

If it then prints "1.1" then everything worked.

If it prints out an error message I would really like to
see it. If you get an error, could you send it to me and
include a copy of the config.log file that configure created.

Thanks for taking the time to try out this package. You might
also want to try it out just for fun. The package will let you
write scripts that can access Java directly from Tcl code.


(Short example of Tcl code that accesses JVM)

#create new java object
set jstr [java::new String "java string"]

#call toString method on the object
set str [$jstr toString]

Of course this example is lame, but you can use this interface
to allocate and invoke methods in any java object.


You might also want to try out Jacl. It is a 100% Java implementation
of a Tcl interpreter. You can compile and run it by typing
"make TCLJAVA=jacl shell" at the command line. I works the same
and Tcl and you can use it to embed scripting features into your
Java program.


thanks again
mo dejong
dejong at cs.umn.edu

Reply via email to