FreeHEP-AIDAJNI 3.2.6 Release Notes

Release Notes Version: $Id: ReleaseNotes-3.2.6.apt 10657 2007-03-28 23:33:26Z duns $.

The most recent version of this file is available here.

Release notes for all versions of AIDAJNI are available here.

AIDAJNI is a C++ adapter of AIDA - Abstract Interfaces for Data Analysis which connects to a Java implementation of AIDA, such as JAIDA.

AIDAJNI allows C++ programmers to use any Java AIDA implementation.

It allows for instance Geant4, written in C++, to create histograms and ntuples in Java and store them in .aida files, which can be analyzed using JAS3 - Java Analysis Studio.

AIDA Compliance

This adapter connects AIDA-C++ to AIDA-JNI. It almost fully supports the AIDA standard. The C++ and Java side are both AIDA 3.2.1 compliant (for usage in Geant 4.x).

Supported Platforms

Binaries are available and supported for the following combinations of architectures and compilers:

  • Windows XP
    • x86-Windows-msvc: Visual Studio 6; Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
    • x86-Windows-msvc: Visual Studio 8; Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86
    • NOTE: these two distributions use the SAME qualifier in this version of AIDAJNI but are distributed as and In a future version these qualifiers will be different.
  • RHEL WS release 3 (Taroon Update 6) 2.4.21-47.0.1.ELsmp (4x1993MHz V20z)
    • i386-Linux-g++: gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-58)
  • RHEL WS release 4 (Nahant Update 4) 2.6.9-42.0.10.ELsmp (2x1792MHz V20z)
    • amd64-Linux-g++: gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)
  • MacOS X 10.4.9
    • i386-MacOSX-g++: gcc version 4.0.1 (Apple Computer, Inc. build 5367)
    • ppc-MacOSX-g++: gcc version 4.0.1 (Apple Computer, Inc. build 5367)
  • Sun Microsystems Inc. SunOS 5.9 Generic May 2002
    • sparc-SUN-CC: CC: Sun C++ 5.8 Patch 121017-08 2006/12/06

Major changes in AIDAJNI 3.2.6

For a full list of changes in AIDAJNI 3.2.6 see the AIDAJNI change log.

For a full list of changes in AIDA 3.2.1 see the AIDA change log.


These release notes list issues specific to the AIDAJNI implementation of AIDA. In general all of the AIDA documentation applies to AIDAJNI, in particular the following are useful:


AIDAJNI is part of the FreeHEP Java Library an "Open Source" library distributed under the terms of the LGPL. If you have questions about the licensing please send a mail to:

Installing AIDAJNI

Download and install a Java AIDA Implementation which supports AIDA 3.2.1, for example JAIDA.

Download AIDAJNI for one or more platforms. These distributions overlay on top of each other, adding support for different architectures. The distribution creates the following directory structure:

freehep-aidajni-version            containing license and release notes
freehep-aidajni-version/bin        containing platform specific directories with setup scripts
freehep-aidajni-version/examples   containing examples
freehep-aidajni-version/include    containing all necessary include files
freehep-aidajni-version/lib        containing platform specific directories with libraries
freehep-aidajni-version/site       containing a copy of this website

NOTE: the aidajni-3.2.6-x86-Windows-msvc[6|8].zip distributions cannot be overlayed on top of eachother as both of them contain the qualifier x86-Windows-msvc internally and thus libraries of one will overwrite libraries of the other. This will be fixed in a future version of AIDAJNI.


The current distributions do not contain source files. However you may follow the instructions under "Build from Source" to get sources and compile them for your platform.

Building an Application with AIDAJNI

Make sure you have the Java Development Kit version 1.4.2 or higher. It is NOT enough to have only the Java Runtime Environment. Make sure JDK_HOME is set to your Java Development Kit.

setenv JDK_HOME /users/tom/j2sdk1.4.2

Now you need to setup your JAIDA implementation, which is platform neutral as this is 100% Java.

Set up environment variable JAIDA_HOME to your unpacked JAIDA distribution. Then source the aida-setup file (.sh/.csh from Unix, .bat for Windows, .sh/.csh for Cygwin).

Example using tcsh:

setenv JAIDA_HOME /users/tom/JAIDA-3.2.4
source $JAIDA_HOME/bin/aida-setup.csh

Set the environment variable AIDAJNI_HOME to your unpacked AIDAJNI distribution. Then source the system specific aidajni-setup file (.sh/.csh from Unix, .bat for Windows, .sh/.csh for Cygwin).

Example for i386-Linux-g++, using tcsh:

setenv AIDAJNI_HOME /users/tom/aidajni-3.2.6
source $AIDAJNI_HOME/bin/i386-Linux-g++/aidajni-setup.csh

NOTE: under Windows/cygwin you need to run

chmod +x ${AIDAJNI_HOME}/bin/x86-Windows-msvc/aida-config.exe

to make aida-config.exe executable. In a future version of AIDAJNI this will be fixed.

Now you are able to execute the aida-config utility:

aida-config --version   will display the version you installed.
aida-config --include   will display the include options 
                        for your compiler.
aida-config --lib       will display the library link options 
                        for your linker.

To compile (example for i386-Linux-g++):

g++ -c `aida-config --include` YourApplication.cpp
g++ YourApplication.o `aida-config --lib`

Running an Application with AIDAJNI

Once you have run the aidajni-setup script successfully you can just execute your application.

Using AIDAJNI from Geant4

For Geant4 version 4.5.x use AIDAJNI 3.0.4 and its Geant4 overlay product. See ReleaseNotes of version 3.0.4.

For Geant4 version 4.6.x and up the fixes to the A01 example and the overlay are included in the Geant4 release. One only needs to install JAIDA and AIDAJNI as described above.

IMPORTANT: Make sure you do not link in OPENGL libraries since they pre-load, which will make the JavaVM crash when it tries to open its first Window/Frame. This does NOT apply to the Windows Operating System of course. This bug was reported to Sun Microsystems as early as JDK 1.3.1, and has not been fixed for JDK 1.5.

Bugnumber 4638291

Features/Limitations of the Current Release

The following limitations exist:

  • There may be memory leaks in some places, but we currently cannot run AIDAJNI through valgrind, since valgrind core dumps on running the Java Virtual Machine.
  • Many routines will return references to objects which are ONLY valid until the next call to the same routine is made.
  • CIxxx.cpp and CIxxx.h classes are currently available for experimental use only. They allow a C++ implementation of an object (Histogram for instance) to be passed to and handled by Java. This allows a C++ histogram to be plotted by a Java plotter. Current concrete CI classes do NOT include: CIAnalysisFactory, CIDataPointSetFactory and CIHistogramFactory. Only classes for which CI classes exist can be passed from C++ to Java.
  • is not implemented because we would need an ostream connected to an
  • ITuple.fill on ITupleEntry is implemented but will not work.
  • ITuple.getObject() will fail if the stored column is not an ITuple.
  • ITree.listObjectNames() and ITree.listObjectTypes() return an empty list in case of failure.

Reporting Bugs

For discussion of features or problems related to AIDAJNI please use the AIDA forum. To report bugs or request enhancements you can also use the AIDAJNI bug database.


The AIDJNI/examples directory contains AidaTest.cpp which serves as a small test as well as an example. The subdirectories g++, CC and msvc contain build scripts to compile and link AidaTest.cpp into an executable. JAIDA and AIDAJNI must have been set up before running the build script.

The standard AIDATest package in C++ is used to test the AIDAJNI adapter. Some minor tweaks are being made to the tests and the JAIDA implementation so that all of them will pass, but we believe the AIDAJNI does not have major errors in it.