Omegahat Installation

Binary Installation

The most basic installation of Omegahat involves obtaining the single file Omega.jar and adding its name to your Java CLASSPATH environment variable, along with the necessary 3rd party Java packages.

Given this setup, you can start an Omegahat session with the command

which brings up the basic interactive, command line evaluator. A different top-level class and collection of options can be specified to start a GUI version or with a different evaluator (perhaps GUI aware, such as the org.omegahat.Environment.Interpreter.GUIHelpEvaluator).

If you experience errors, it may be that the default evaluator is looking for the Swing and JHelp packages. In this case, use the command

       java -DevaluatorClassName=org.omegahat.Environment.Interpreter.InteractiveEvaluator
to force the use of the basic interactive evaluator that does not require any Swing-based classes.

Alternative Binary Installation

An alternative installation approach which provides slightly more direct flexibility is to install the Omega.jar file along with the Omegahat scripts. These take care of providing simple command line access to the omegahat session by setting the class path appropriately and expanding the class package names, handling CORBA access, etc.

The installation is very similar to the one above, but this time you download the OmegaBinary.tar.gz file. This contains

Un-tar this file into what becomes the value of the environment variable OMEGA_HOME. Then, you can invoke the shell script
in the usual way. The options and initialization scripts are read from the appropriate directories in the Environment/ directory.

Source Installation

The source installation is more complicated than its binary counterpart. As well as compiling the source, one must also convert the source files into simple Java code from noweb. While there are many tools to install to take full advantage of the noweb source, to compile to Java, you only need the notangle. You will also require Perl

Having obtained the source, you should have a directory named org/omegahat at some point in the directory hierarchy. Set the environment variable OMEGA_HOME to this directory, e.g.

    setenv OMEGA_OMEGA wherever/org/omegahat      # {t,}csh
    export OMEGA_OMEGA=wherever/org/omegahat      # bash

Configuring the Compilation

Because of the relatively simple nature of the software (so far), we do not use autoconf. Instead, change directory to the Config directory below OMEGA_HOME and issue the command
    make local.make
This produces a file that is used by both make and the Bourne shell to set variables. You do not have to set all of the variables listed in this file, just the ones for which the default values are different value on your system. You will have to set the locations of the 3rd party packages if they are not in the directory $OMEGA_HOME/Jars.

Compiling the Source

At this point, you can compile the source.
This produces more output than you ever want to see. It traverses all the subdirectories in the source tree and creates the .java files from the noweb. Then it performs a second pass to create the .class files.

The next step is to create the omega script that is used to start an omegahat session.

  gmake scripts

Third Party Packages

The base classes in the Omegahat distribution that are required to bring the system up rely on the following packages.
ANTLR, the parser generator.
Antlr download. At present, we use 2.4.0 and I construct the jar file by hand from the un-tarred directories to ensure all the classes are available.
Jas, the byte-code generator
Other incarnations of Omegahat require different support packages.
JHelp, the Javasoft help system.
jhbeta This is used in the org.omegahat.Environment.Interpreter.GUIHelpEvaluator evaluator to provide the help system framework.
Swing, the enhanced GUI classes for Java.
These are not 3rd party for Java2, but are core classes.
GNU Regular Expressions for Java
The current implementation of the CORBA material is known to run on the free for non-commercial use Orbacus.
Those who have access to the machine can pick up the 3rd-party jar and the Omega.jar files by (s)copying the file Jars directory from the main account.

Given this setup, the following commands in tcsh set the CLASSPATH correctly

    cd Jars
    setenv CLASSPATH `pwd`/antlr.jar:`pwd`/jas.jar:`pwd`/Omega.jar:${JAVA_HOME}/lib/

Duncan Temple Lang <>
Last modified: Mon Apr 19 18:40:12 EDT 1999