NCSA Java HDF5 Interface (JHI5) |
Download |
JHI5 Design Notes |
When installed on a system, the JHI5 consists of two parts, the Java classes and the jhdf5 native library (which includes the HDF-5 library). The Java classes are the same for every platform, but the jhdf5 library must be built for each platform.
The usual installation would be something like:
for a solaris platform, installed in a directory <JHI5DIR>. Other platforms would have the same JAR file, but a different libjhdf5.a<JHI5DIR>/lib/ jhdf5.jar solaris/ libjhdf5.so
At run time, the environment must be set to include the path to the JAR file in CLASSPATH, and the dynamically loaded library in LD_LIBRARY_PATH (on Unix) or PATH (Windows98/NT).
* Note: The Java HDF-5 Interface builds a dynamically loaded C library (e.g., libjhdf5.so), which is loaded by the Java Virtual Machine. This wrapper code depends on HDF-5 (libhdf5), which in turn requires GZIP (libz). On all Unix systems tested so far, the JVM cannot resolve these dependencies if the libhdf5 and libz are dynamic libraries. For this reason, it is necessary to link the libjhdf5.so with the static versions of libhdf5.a and libz.a, and then create a dynamic library, libjhdf5.so. The configure script and Makefile implement this requirement. |
Unix:
For a Unix system, run the automatic configuration program:
./configureThis program requests the location of the prerequisite HDF-5 and GZIP libraries and the Java development tools, and
To build, type:
makeTo install the Java HDF-5 Interface library and JAR file, type:
make installWindows:
For a Windows 95/98/NT system, there will be two steps to build the JHI5.
The building procedure depends on what C/C++ compiler you are using. You will need two things to build the jhdf5.dll,
A batch file to compile the JHI5 Java classes is provided at your_jhi5_root/win32_make.bat to compile and pack the JHI5.
Before you run the batch, edit win32_make.bat to set the JDK path to the location of the JDK. For example,
The JHI5 root should be set to the directory in which the JHI5 will be built.SET JAVAHOME=d:\java\jdk1.2.2
Then execute win32_make.bat.
To help debug problems with these paths, the JHI5 distribution includes a test program, etc/TestHDF5Link.java. To test the JHI5 installation, build and run the TestHDF5Link program. The output will report the 'java.library.path' and whether the JHI5 and HDF-5 library are correctly loaded. If the TestHDF5Link program works, then its configuration can be used by any program that needs to use the JHI5.