Demeter software installation guide

(Instructions for using the Northeastern CCIS installation are here.)

DJ and the AP Library

To install DJ and the AP Library without installing DemeterJ, simply download the rt.jar file and put it in your class path (do not unpack the jar file). This file is also included in DemeterJ. For more information about using the class path in Java, check out the SDK tools documentation for Solaris and Linux or Windows.

DemeterJ

  1. Download and install Java Compiler Compiler (JavaCC) (version 2.1 or later). To run the installer, run
    java -cp . JavaCCversion
    where the class file you downloaded is named JavaCCversion.class.
  2. Download the latest demeterj-version.jar file from the ftp directory.
  3. Unpack the archive with Sun's jar tool (available in the SDK) using the command
    jar xvf demeterj-version.jar
    (You can also use any unzip tool, such as Winzip.) The resulting directory (referred to below as installdir) contains the runtime library (rt.jar) and the tools library (demeterj.jar), as well as scripts in the bin directory and source code in the src directory.

    Note: the src directory contains the source code to the Demeter software; it is provided only for your curiosity. You don't need to compile anything to run it; the .jar files have all the bytecode files you need.

  4. Add the bin directory to your executable path: (Unix only: Make the shell script executable with the command chmod a+x bin/demeterj.)
  5. Edit the shell script or batch file in bin so that it sets the environment variable DEMETERJ_HOME to installdir. In Unix, you can just set DEMETERJ_HOME in your own environment if you don't want to edit the script.

Verifying your setup

Run these commands to make sure you have the right versions of everything in your PATH:

Testing the DemeterJ installation

  1. In a new, empty directory, run demeterj new. This will create the project file, program.prj, as well as sample class dictionary, behavior, and test input files, program.cd, program.beh, and program.input, respectively.
  2. Run demeterj test. This should compile and run the test program; if successful, it will print "It works!" at the end.
    Note: Windows users: if you notice the compilation process seems to hang for a long time (usually after JavaCC finishes), you'll need to stop it (with control-C) and run demeterj -eofbug test. It should continue where it left off. We're working on a better solution to this problem.

Doug Orleans <lieber@ccs.neu.edu>
Last modified: Thu Sep 11 12:56:11 EDT 2003