Building Jacl under Windows


About:

Jacl users should note that a pre-compiled binary release is available, so building from source is not required. Jacl is built under Windows using a configure script and the Mingw/Msys package. The Mingw/Msys package is a minimal unix style shell environment that is used to execute a configure script under Windows.

First, download the Mingw/Msys zip file here and extract into C:/ or some other location on your machine. See the included README.TXT file for more info about how to start the msys shell.

The following assumes that the user has started the msys shell and has created a temp directory /build/jacl, that Jacl (1.4.0) has been downloaded and saved in this directory, that Jacl will be installed into /opt/jacl, and that the JDK install is located in C:/jdk14 which is referred to as /c/jdk14 when passed to the configure script.


mkdir /build
mkdir /build/jacl
cd /build/jacl
(Save archive in C:/msys/build/jacl)

unzip jacl140.zip
mkdir build
cd build
../jacl1.4.0/configure --prefix=/opt/jacl --with-jdk=/c/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 the make install target will install two startup scripts. The first is called jaclsh and is used to launch Jacl from a msys shell. The second is called jaclsh.bat and is used to launch Jacl from a Windows cmd prompt or from the Windows Explorer.


(From the msys shell)
/opt/jacl/bin/jaclsh
% package require java
1.4.0
% exit

(From Windows Explorer, double click on jaclsh.bat in C:/msys/opt/jacl/bin)
% package require java
1.4.0
% exit

TJC Compiler

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

Installed Files