The JSE Reference Manual describes how to build JSE with make. Here we provide a portable alternative using Jscheme, a Scheme dialect implemented in Java.
You must already have JDK1.3 on your machine. Make sure you can run the commands java and javac from your shell by just typing their names.
Windows uses "\" for a directory separator, and ";" as the path separator. UNIX uses "/" for a directory separator, and ":" as the path separator. To complicate things further, the bash shell uses "/" and ";" on Windows, and "/" and ":" on UNIX platforms. Inside a Java application, either "\" or "/" can be used in file names, but the platform specific path separator is used.
Thus it is not possible to write a single portable shell script. We solve this problem by generating bash and bat versions of each script for your particular machine.
The examples below are written in the style appropriate for a UNIX shell. So, when invoking a command in the .bat shell in Windows you will need to use "\" to name the command though the arguments can use "/".
The command bin/build can be used to run various build operations.
To see what arguments bin/build will currently take, run the command:
bin/build -help |
This should produce something like this:
With no commands an interactive prompt is provided. command ::= -key arg* Where command is one of: -help = Print this message. -clean = Start with a clean slate. -compile = Recompile updated sources. -jse arg* = Run JSE with the given arguments. (-help (0 msec) (944 bytes)) (builder exiting) |
So for example, to do a clean recompile do:
bin/build -clean -compile |
New command can be added to the file SRC/build/build.scm, using the procedure (add-command name documentation procdure).
For example, the -jse command is defined as:
(define (cmd-jse . args) (JSE.main (list->array String.class args))) (add-command '-jse "-jse arg* = Run JSE with the given arguments." cmd-jse) |