Top | Web home | SourceForge home
SourceForge.net Logo
$Id: //guest/julian_hyde/saffron/doc/install.html#1 $
(C) Copyright 2002, Julian Hyde
Author Julian Hyde (julian.hyde@mail.com)
Created February 15th, 2002

How to build and install Saffron

1. Contents

  1. Contents
  2. Modification history
  3. Setup build environment
  4. Build
  5. Run the demo
  6. Miscellaneous
    1. Coding guidelines

2. Modification history

Date Revision Author Comment
February 15th, 2002 1 Julian Hyde Created

3. Setup build environment

These are the products I used to build mondrian. Install all of the products marked 'required'. (I use /-es in paths because I am run MKS on Windows 2000, and it makes things simpler.)

In the following, the symbol ${project.location} means the root of your source tree.

Product Required? Version Comment
JDK Yes 1.1 or later (I use version 1.3.1.) Available from http://developer.java.sun.com/. I downloaded j2sdk-1_3_1_02-win.exe, and extracted to E:/jdk1.3.1_02. Set JAVA_HOME to same, and CLASS_PATH to %JAVA_HOME%/lib/dt.jar.
Ant Yes 1.4.1 or later  Available from here. I downloaded jakarta-ant-1.4.1-bin.zip and extracted to E:/jakarta-ant-1.4.1; and downloaded jakarta-ant-1.4.1-optional.jar (needed for JavaCC) to E:/jakarta-ant-1.4.1/bin/lib and renamed to optional.jar. Edit ${project.location}/build.bat. to reference your Ant install.
Jikes No   Available from http://oss.software.ibm.com/developerworks/opensource/jikes/. I downloaded jikes-1.15-windows.zip, and extracted jikes.exe to C:/winnt/system32. Then I modified the relevant line of ${project.location}/build.xml:
<property name="build.compiler" value="jikes"/>
Xerces Yes 1.4.1 or later Download Xerces-J-bin.1.4.1.zip (or similar) from http://xml.apache.org/xerces-j/, and extract xerces.jar to ${project.location}/lib.
Intellij IDEA (a Java IDE) No 2.5.1 You can download a 30-day evaluation copy from http://www.intellij.com/idea/. Follow the instructions in Install.txt in idea-2_5_1.zip to there.

Create a project ${project.location}/mondrian/mondrian.ipr. Set the compiler output path to ${project.location}/mondrian/classes/. Add hsqldb.jar, javaCupClasses.zip, and xerces.zip in ${project.location}/mondrian/lib/ to the class path.

To use Ant build, click the '6: Ant Build' tab, click '+', choose ${project.location}/mondrian/build.xmlc, then right-click, choose 'Properties', and choose 'Include project classpath'. (javaCupClasses.zip is needed in order to build the mondrian/olap/Parser.java target.)

JavaCC (parser generator) Yes JavaCC2.1 Available from http://www.webgain.com/products/java_cc/. Install in E:/javacc2.1 or similar. Edit ${project.home}/build.bat. Edit ${project.home}/build.xml.

4. Build

As follows:

cd ${project.location}
make

5. Run the demo

(there is no demo)

6. Miscellaneous

6.1. Coding guidelines

Indentation 4. Tab stop 4. Use tabs, not space. 'Berkeley' bracing convention. Use braces even for single-line blocks. Declare variables as near to their first use as possible. Don't initialize variables with 'dummy' values just to shut up the compiler. No line longer than 79 characters. Javadoc comments on methods are written in the active ('Collects garbage.') not imperative ('Collect garbage.') When editing HTML documents, don't use an editor which reformats the HTML source (such as Word).

End $Id: //guest/julian_hyde/saffron/doc/install.html#1 $