Jacl users should note that a pre-compiled binary release is available,
so building from source is not required. Jacl is built using a
configure
script and has been tested on a variety
of UNIX/Linux systems.
First, download the Jacl archive file and uncompress it into a
directory. The following assumes that the user has created
a temp directory /tmp/jacl
, that the archive
file has been downloaded and saved in this directory, that
Jacl will be installed into /opt/jacl
, and
that the JDK install is located in /opt/jdk14
.
cd /tmp/jacl tar -xzvf jacl1.4.0.tar.gz mkdir build cd build ../jacl1.4.0/configure --prefix=/opt/jacl --with-jdk=/opt/jdk14
After the configure script finishes, run the following commands to build and install Jacl.
make make install
One can also build and run the optional regression tests with the following command. Be aware that running the regression tests can take a long time.
make test
Running make install
will install a startup script that
should be used run Jacl. This script is named jaclsh
,
it would be installed into /opt/jacl/bin/jaclsh
by
the example above.
/opt/jacl/bin/jaclsh % package require java 1.4.0 % exit
The TJC compiler is included in Jacl 1.4.0 and later releases. The TJC compiler is used to compile Tcl code into Java bytecode which is then executed directly in the JVM. Since the TJC compiler is implemented in Tcl, TJC can be used to compile itself. This is known as a 2-stage compile and makes the TJC compiler execute about 10 times faster. For this reason, it is suggested that users build TJC via a 2-stage compile as follows. Be aware that this process is very slow, it can take 20 minutes or more on a fast system. Also note that Jacl must have been built and installed before the following commands are run.
make tjc2 make install
jaclsh
: Startup script for Jacl
tjc
: Startup script for TJC compiler
tcljava.jar
: Files common to both Jacl and Tcl Blend
jacl.jar
: Files specific to Jacl
itcl.jar
: Itcl for Jacl
janino.jar
: Janino Java compiler
tjc.jar
: TJC compiler