Under Solaris, Toba can be built using either Sun C or GCC.
To use Sun C, ensure that /opt/SUNWspro/bin/cc is the first
cc in the search path.
To use GCC, ensure that gcc is in the search path.
The Irix and Linux implementations expect to find cc in the search path.
To build Toba from Windows NT, the Cygwin32 package must be installed. The Cygwin32 package is available from www.cygnus.com. Toba has been tested with version beta 17.1. It is important to remember to make a copy of the shell in the /bin directory. Without /bin/sh.exe Toba will not build properly. Toba must be built from the cygwin shell; it will not properly build from the MS/DOS command interpreter.
Depending on the system, between 25 and 45 megabytes of disk space are needed to build Toba. Linux and Windows NT require 25 megabytes of free space. Solaris and Irix require 45 megabytes of free space. The size of the JDK package (and under Windows NT, the Cygwin package) is included in this amount.
Two packages are needed to build Toba: the Java Developers Kit, originally from Sun, and Toba itself, from Arizona. If you haven't done so already, download these now.
Get version 1.0.2 of the Java Developers Kit (JDK) from:
NOTE! An older release of the 1.0.2 JDK for
Solaris had an API implementation that is not compatible with
Toba's runtime library. If you get compile errors while building
runtime/lang_UNIXProcess.c then you will need to get
the latest 1.0.2 JDK release from
java.sun.com.
Get Toba from www.cs.arizona.edu.
tar xf JDK_2.1.tardist
inst
Inst> from .
Inst> go
Inst> quit
The JDK will be installed in the /usr/java directory.
The -r flag can be used to tell inst to install
the package in a different directory.
Next unpack the Solaris JDK and copy the classes.zip file
to your /usr/java/lib diretory using commands such as these:
zcat JDK-1_0_2-solaris2-sparc.tar.Z | tar xf - java/lib/classes.zip
cp java/lib/classes.zip /usr/java/lib/classes.zip
zcat linux.jdk-1.0.2-pl2.common.tar.gz | tar xf -
zcat linux.jdk-1.0.2-pl2.static-motif.tar.gz | tar xf -
Tar will create the JDK in a directory named java,
which can be moved or renamed if you wish.
zcat JDK-1_0_2-solaris2-sparc.tar.Z | tar xf -
Tar will create the JDK in a directory named java,
which can be moved or renamed if you wish.
Nothing more than unpacking the tar file is needed. You need not build or configure the JDK in any way.
Uncompress and untar Toba using a one of these commands:
zcat toba.tar.Z | tar xf -
gzcat toba.tar.gz | tar xf -
Unpacking Toba produces a directory named toba_1.0.b6,
which again can be moved or renamed.
This directory will be called the "main Toba directory"
in subsequent discussion.
To build Toba you need to have the java compiler and interpreter
in your path and you must have your CLASSPATH set to
include the standard classes. If you have not done this already,
enter the following commands, replacing /path/to/JDK with
the full path to the java directory of the JDK package:
% set jdk = /path/to/JDK
% set path = ( $path $jdk/bin )
% setenv CLASSPATH $jdk/lib/classes.zip:$jdk/classes
in a csh-like shell, or
$ jdk=/path/to/JDK
$ PATH=$PATH:$jdk/bin
$ CLASSPATH=$jdk/lib/classes.zip:$jdk/classes
$ export PATH CLASSPATH
in a Bourne-like shell. Once the path and classpath have been
set properly you are ready to build Toba.
Change to the main Toba directory and enter one of these commands:
make irixfor Irix make linuxfor Linux make solarisfor Solaris using Sun C make solaris_gccfor Solaris using GCC make win32for Windows NT
The build process may take as long as an hour, depending on the speed of the machine. The Toba classfile translator is small and builds quickly; most of the time is spent translating and compiling the Java application library (API), the compiler (javac) and the AWT (BISS). Note that there may be long periods of time where there is no output sent to the screen while large C compiles are being performed.
When make finishes, the build is complete.
This can be confirmed by entering
make test
to compile and execute a simple Java program that prints
the values of some system properties.
Toba can be run by adding the bin directory to your search path.
Usage instructions are given on a separate page.
It may be desirable to install the Toba "binaries" somewhere other than the directory in which they were built. The usual term "binaries" is somewhat a misnomer in this case; we use it to mean the minimal set of files needed to use Toba, although some of these are readable source files.
To copy this minimal set, create a new directory and enter
make install INSTALL=directory
substituting the actual directory name.
The "binaries", totaling about 15 MB, will be copied into
subdirectories of this directory.
The installation process re-links two programs
to update the embedded shared library pointers.
The bin subdirectory should be added to search paths
to use Toba.