Gcj is now able to compile Jacl!

Mo DeJong mdejong@cygnus.com
Fri May 25 02:37:00 GMT 2001

I just tried to compile Jacl with gcj from the 3.0
branch and it worked! Many thanks go to Alex
for fixing all the compiler bugs. Jacl is a pure
Java implementation of Tcl, it has worked with
the JDK for some time but this is the first
time I have been able to compile it with gcj.

Here is the magic incantation in case you want
to try it yourself. Note that you need to merge
the jacl and tcljava src dirs for this to work.
You also need to set the CLASSPATH to the CWD
before running these commands.

% gcj -o jacl.o -c tcl/lang/*.java \
tcl/lang/reflect/PkgInvoker.java \

% gcj -o jacl --main=tcl.lang.Shell jacl.o

% ./jacl 
% package require java
% set str [java::new String "I am a string"]
% $str toString
I am a string

That is just too cool. Now I just need to find some
time to add gcj support to the existing build system.

All I can say is, three cheers for the Java group!

Mo DeJong
Red Hat Inc

More information about the Java mailing list