Version 1 of Building JACL with Msys

Updated 2003-09-17 11:09:48

PT 19-Sep-2003

The Msys package from the mingw project [L1 ] provides a minimal unix shell environment that can be used to run configure scripts for many open source packages. Following some Tclers chat discussion, here is how to setup Msys for use with the JDK and optionally with jikes to build jacl.

Once Msys is installed and you run the shell using the icon provided you are using a bash shell. If you have never used a unix shell before, then you should read a tutorial from [provide a link]. The shell needs to be told where you installed your JDK files. This is most simply done by creating a directory with mkdir /etc/profile.d and copying the following text into a jdk.sh file in this subdirectory.

  JDK=/opt/j2sdk1.4.2
  JRE=$JDK/jre

  if [ -d $JDK ]; then
     PATH=$PATH:$JDK/bin
     CLASSPATH=.:$JDK/lib/tools.jar:$JDK/lib/dt.jar:$JRE/lib/rt.jar:$JRE/lib/jsse.jar:$JRE/lib/jce.jar
     export PATH CLASSPATH
  fi

If you restart your Msys shell, then entering 'javac' at the command line should give you a help message from javac.

Now you are all set. Unpack the jacl source somewhere and cd to that location. Then do something like

  ./configure --prefix=/opt/jacl --with-jdk=$JDK

If you want to use jikes as the compiler then do

  ./configure --prefix=/opt/jacl --with-jdk=$JDK --with-jikes=/opt/bin/jikes.exe

Then do

  make
  make test
  make install

and its done. Thats it. Go play.

 $ /opt/jacl/bin/jaclsh
 % parray tcl_platform
 tcl_platform(byteOrder)     = bigEndian
 tcl_platform(host_platform) = windows
 tcl_platform(machine)       = x86
 tcl_platform(os)            = Windows XP
 tcl_platform(osVersion)     = 5.1
 tcl_platform(platform)      = java
 %

See also jacl, mingw