– Development Setup

Almost all of is written in Java. The core development team uses both Windows 2000 and Linux machines for development work. By relying on command line tools, we are able to have a reasonable cross-platform setup.


Java 2 SDK (v 1.3)     java, javac, jar, javah, javadoc
CVS cvs
GNU tools cp, make, rm
Perl perl

We use the Cygwin port of the GNU tools on Windows.

Libraries uses Sleepycat's Berkeley DB as a storage substrate. It also uses Markus Dahm's Byte Code Engineering Library to provide binary rewriting services. The JAR files and dynamically linked libraries (DLLs) for these two packages are located in the bin directory (see below). The individual files are:

    Berkeley DB DLLs for Windows Berkeley DB DLL for Linux
db.jar Berkeley DB JAR file on all platforms
BCEL.jar Byte Code Engineering Library JAR file on all platforms

In addition to above libraries, relies on a DLL to generate GUIDs (globally unique identifiers). This DLL, called one_util_Guid.dll on Windows and on Linux is also located in the bin directory. The sources for the library are part of the source tree and the library can be made by executing "make jni" and then "make guiddll" in the one/util source directory. On Windows, building the GUID DLL requires the Visual C command line tools.

Note that the native libraries contained in the bin directory must be in the library path of your machine and that the JAR files must be in the class path.

Directory Hierarchy

java     The root of the development tree, including global make files.
bin Binaries, notably dynamically linked libraries and JAR files.
classes Class files, using package name components for subdirectories.
docs The class documentation generated by javadoc; the documentation for is in the one subdirectory.
release The root directory of the embedded binary release.
scm Scheme source files.
scripts Root shell scripts.
src All other source files, notably Java source files, using package name components for subdirectories.
tools Miscellaneous tools.

Environment Variables

JAVA_HOME     The JDK directory, e.g., C:\jdk1.3.
JAVA_DEV_ROOT The root of our directory hierarchy, e.g., C:\java.
CLASSPATH The class path, e.g., C:\java\classes; C:\java\bin\db.jar; C:\java\bin\BCEL.jar.
CVSROOT The root directory for the CVS repository, e.g., :local:X:\unix\projects\portolano\one\vault (assuming that \\\cs is mounted as X:) or when tunneling through SSH
CVS_RSH /usr/bin/ssh when tunneling through SSH. Otherwise this variable should not be defined.
PATH_SEP The path separator for the local operating system, e.g., ";" for Windows and ":" for Unix.
GUID_STATE On Unix machines, the local directory for storing state needed for the generation of GUIDs.
LD_LIBRARY_PATH On Unix machines, the bin directory must be part of this path; on Windows machines, the bin directory must be part of the regular path.

A note on path segment separators: It is OK to use "\" within environment variables on Windows, but all paths in make files must use "/" as the path segment separator.

A note on tunneling through SSH: On Windows machines, you need to invoke cvs from either the bash or tcsh shells. Invoking cvs from the command shell won't work.

Configuration can be configured through several parameters, which are expressed through Java system properties and are specified in a configuration file. The configuration parameters are described in the detail on the configuration page.

Coding Conventions

We generally follow the Java code conventions (in PDF) and make liberal use of javadoc comments. Though, we use two spaces as the unit of indentation.

Some Useful Pointers