How to Build
Required Software
JDK 1.3 or JDK 1.4
JDK stands for Java development kit and includes compilers and tools to
build and run Java applications. Most likely JDK 1.2 also works, but
currently only JDK 1.3 and JDK 1.4 are supported.
http://java.sun.com/j2se/1.3/download.html
Jakarta Ant 1.4.1
Ant is a platform independent build tool. LDBC currently supports only
the Ant build script (build.xml). Compiling from an IDE or from command
line is possible, but not supported. The reason is to reduce the
maintenance required to keep multiple versions of build scripts
up-to-date. Currently version 1.4.1 is used, but most likely older and
newer Ant versions also work.
http://jakarta.apache.org/ant/index.html
Optional Software
The following software is not required to build LDBC, however it is the
software currently used to develop LDBC, and people new to Java might
find it useful:
JEdit 4.x
JEdit is an open source Java editor. There are many plug-ins available
and the startup time is fast.
http://www.jedit.org
Antlr 2.7.1
Antlr stands for Another Tool for Language Recognition and is the
parser generator used by LDBC. Antlr is also open source.
http://www.antlr.org
Mozilla Composer
The Composer is probably not the best HTML editor, but it works (in
most cases) and is free and easy to use. The composer is part of the
Mozilla application. If you just want a browser, you might be interested
in Phoenix, something like a subproject of Mozilla.
http://www.mozilla.org
OpenOffice
The vector graphics are currently created using OpenOffice Draw.
http://www.openoffice.org
Gimp
Gimp is an open source graphics toolkit. It is used to add the drop
shadow to the graphics.
http://www.gimp.org
How to Compile the Source Code
Preparing the code for the JDK
LDBC can be compiled with JDK 1.3 or JDK 1.4, however if JDK 1.3 is
used, then code must be 'switched' to JDK 1.3 first. The reason is
additions to java.sql.* in JDK 1.4 that are not backward compatible.
Switching the code to JDK 1.3
On the command line, go to the source directory.
Switch the code using ant:
C:\ldbc\source>ant disable_jdk14
Build file: build.xml
disable_jdk14:
[java] org/ldbc\jdbc\jdbcConnection.java
[java] org/ldbc\jdbc\jdbcPreparedStatement.java
BUILD SUCCESSFUL
Total time: 1 second
If you want to compile using JDK 1.4 or later, you need to enable
the JDK 1.4 extensions using:
C:\ldbc\source>ant enable_jdk14
Compiling
On the command line, go to the source directory.
Start the build by calling ant. The expected output is:
C:\ldbc\source>ant
Build file: build.xml
all:
clean:
antlr:
[javac] Compiling 141 source files
parser:
[java] ANTLR Parser Generator Version 2.7.1 1989-2000 jGuru.com
[javac] Compiling 4 source files
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -deprecation for details.
compile:
[javac] Compiling 40 source files
javadoc:
[javadoc] Generating Javadoc
[javadoc] Javadoc execution
[javadoc] Loading source files for package org.ldbc.jdbc...
[javadoc] Loading source files for package org.ldbc.core...
[javadoc] Loading source files for package org.ldbc.test...
[javadoc] Constructing Javadoc information...
[javadoc] Building tree for all the packages and classes...
[javadoc] Building index for all the packages and classes...
[javadoc] Building index for all classes...
[delete] Deleting 1 files from C:\ldbc\docs\javadoc
[delete] Deleting 1 files from C:\ldbc\docs\javadoc
[delete] Deleting 1 files from C:\ldbc\docs\javadoc
jar:
[jar] Building jar: C:\ldbc\lib\ldbc.jar
BUILD SUCCESSFUL
Total time: 15 seconds
The actual output may be different due to future changes in the build,
or due to a different environment.
Antlr and Regexp
LDBC uses it's own version of Antlr, in a different package than the
original Antlr. The reason is other applications (for example
BEA/WebLogic) also use Antlr internally (see Antlr FAQ). To make sure
different version of Antlr don't conflict to each other, Antlr is moved
to a different package.
LDBC also uses it's own copy of (Jakarta) Regexp. Regexp is currently
not used, but can be used if Antlr is updated.
How to replace Antlr with a new version
The following procedure is tested with version Antlr 2.7.1. In addition
to replacing the package name, it will also delete the Antlr files that
are not required by LDBC.
- Remove the folder org/ldbc/antlr
- Copy the directory 'antlr' from the Antlr installation to
'org/ldbc'
- On the command line, run:
ant replace_ant
After this, you need to build everything.