Go to the first, previous, next, last section, table of contents.
Before installing Kawa, you must have Java working on your system.
You can compile Kawa from the source distribution. Alternatively, you can install the pre-compiled binary distribution.
You will need a working Java system. The discussion below assumes you are using the Java Developer's Kit (JDK) version 1.1.x from JavaSoft (Sun). (Kawa has also been reported to work with Kaffe, Symantec Cafe, J++, and JDK 1.2beta.) You can download free copies of JDK 1.1.x for various platforms.
The program java
is the Java interpreter.
The program javac
is the Java compiler,
and is needed if you want to compile the source release yourself.
Both programs must be in your PATH
.
You also need to set CLASSPATH
so it includes both the
current directory, and the standard Java library.
After you have installed Kawa, the CLASSPATH
needs to
include wherever you installed Kawa.
If you have the JDK in directory $JDK
,
and you are using a Bourne-shell compatible shell
(/bin/sh, ksh, bash, and some others) you can set both variables thus:
PATH=$JDK/bin:$PATH CLASSPATH=.:$JDK/lib/classes.zip export PATH CLASSPATH
The binary release includes only the binary compiled `.class' versions of the same `.java' source files in the source release. It does not include any documentation, so you probably want the source release in addition to the binary release. The purpose of the binary release is just to save you time and trouble of compiling the sources.
The binary release comes as a .zip
archive
`kawa-1.6.1-compiled.zip'.
You can unzip the archive, or you can use it as is.
Assuming the latter, copy the archive to some suitable location,
such as /usr/local/lib/kawa-compiled.zip
.
Then, before you can actually run Kawa, you need to set CLASSPATH
so it includes the Kawa archive. On Unix, using a Bourne-style shell:
CLASSPATH=/usr/local/lib/kawa-compiled.zip export CLASSPATH
On Windows95/WindowsNT, you need to set classpath
in a DOS console.
For example:
set classpath=\kawa\kawa-compiled.zip
Then to run Kawa do:
java kawa.repl
The Kawa release normally comes as a gzip-compressed tar file named `kawa-1.6.1.tar.gz'.
In your build directory do:
tar xzf kawa-1.6.1.tar.gz cd kawa-1.6.1
Then you must configure the sources. This you can do the same way you configure most other GNU software. Normally you can just run the configure script with no arguments:
./configure
This will specify that a later make install
will install the
compiled `.class' files into /usr/local/share/java
.
If you want them
to be installed someplace else, such as $PREFIX/share/java
, then
specify that when you run configure:
./configure --prefix $PREFIX
Thus you need to compile all the .java source files. Just run make:
make
This assume that `java' and `javac' are the java interpreter and compiler, respectively. If you are using the Kaffe free Java interpreter, you need to instead say:
make JAVA=kaffe
You can now test the system by running Kawa in place:
java kawa.repl
or you can run the test suite:
(cd testsuite; make check)
or you can install the compiled files:
make install
This will install your classes into $PREFIX/share/java
(and its
sub-directories). Here $PREFIX
is the directory you specified
to configure with the --prefix
option, or /usr/local
if you
did not specify a --prefix
option.
To use the installed files, you need to set CLASSPATH
so
that $PREFIX/share/java
is on the path:
CLASSPATH=$PREFIX/share/java export CLASSPATH
This is done automatically if you use the `kawa' script.
I have not yet tried to build Kawa from source on Windows95, though I understand others have done so. (If you know how, let me know!)
Go to the first, previous, next, last section, table of contents.