Building the OpenDA Java source code

This page describes how to build the OpenDA Java source code. These sources are located in the core/java directory of the source distribution, but when building everything, ant can be run from the OpenDA root directory (it will use the build.xml file located there).


OpenDA software consists of four different modules. The first module is the core module, which contains the core of OpenDA software. The three other modules are named after the components of data assimilation: models, observers, and algorithms. Each of these modules contains all programs and files related to the respective data assimilation component. The core module contains programs, which interface the other three modules. Modules for larger models with real applications are stored separately.

Native libraries, written e.g. in C or Fortran are provided both as source and binaries with OpenDA. By default the build processes use the binaries. All binaries provided are 32-bit and therefore need a 32-bit version of Java. You can recompile the required native libraries as 64-bit if needed, for which you will need a 64-bit version of Java. For some blackbox-wrappers en small models you may not need any native libraries, so both 32-bit and 64-bit Java can be used.

Installation of Ant

To build OpenDA software, a command-line tool ant is used. Ant is similar to make, but written in Java, so that it is portable between different platforms. If ant is not installed in your computer yet, you can download it from . For Linux users it is probably easier to use their package manager to install ant. Before installing ant, please check that a recent 32-bit version of Java is installed (which can be downloaded from or in case of Linux, installed with the package manager).

Build commands

For the following description it is assumed that the OpenDA source is available in a directory named <path_to_openda>/public .
Start by opening a command window (Windows) or a command shell (Linux) and change directory to the OpenDA main directory.

Compiling OpenDA

From the OpenDA main directory, you can compile all modules at once. Besides compilation there are several other options:

Compiling individual modules

From the module directory, you can compile a single module. Within a module directory the build file has somewhat different options:

Compiling stand-alone modules

when providing others with a stand-alone module, you will have to provide other modules your stand-alone module depends upon (if any). The easiest way to achieve this, is by using ant make-standalone (after building all OpenDA modules) in the module directory. This will copy the files needed to the module directory.

Directory structure

Upon the execution of the command ant build or ant doc , the following folders are created in the main directory:

Each module directory has the following structure:

Removal of generated files

To remove the files generated by a build, you can use ant clean on the command-line. From within a module directory, this command will remove the bin , build and javadoc directories, and the MANIFEST.MF file. It does not affect other modules nor the folder bin in the OpenDA main directory. Executing the command line ant clean from the OpenDA main directory will delete the folders bin , doc , and xmlSchemas in the main directory, as well as removing all modules' generated files. Note: to be able to delete files, they cannot be in use (obviously), so close them first.