hdf images hdf images

This web site is no longer maintained (but will remain online).
Please see The HDF Group's new Support Portal for the latest information.

Obtain HDF Java Products for 32-bit object IDs (HDF5-1.8)

Latest Release:   HDFView 2.14 / HDF Java 3.3.2

Please be aware that the software included below uses the HDF4 and HDF5 Java wrappers with 32-bit object identifiers for use with HDF5-1.8.19 and HDF 4.2.13


Source Code

The source for both HDFView and the HDF Java native interfaces are provided below.


Binary Distributions

There are two sets of pre-built binaries provided with this release:

The binaries below are for 64-bit unless otherwise noted.

Windows ONLY: HDFView was built with VS 2015, and it requires that the Visual C++ Redistributable Packages be installed on your machine. If you cannot access HDF5 files then you do not have these packages. You can obtain them from HERE.


Documentation

HDFView + Object Package 2.14
HDF5 Javadocs 3.3.2
HDF4 Javadocs 3.3.2


Known Problems and Workarounds

Windows error, Failed to open the file ...unsupported File Format

HDFView was built with VS 2015, and it requires that the Visual C++ Redistributable Packages be installed on your machine. If you cannot access HDF5 files then you do not have these packages. You can obtain them from HERE.

On Mac OS X, clicking on an HDF5 file brings up an empty HDFView

If you click on an HDF5 file on the Mac, it will bring up HDFView. However, the HDF5 file that you clicked on will not be opened in HDFView.

Windows error, "PATH too long installer unable to modify PATH!"

As part of the HDFView installation on Windows, a user can select to add the HDFView path to the system path. If there is not enough space to accomodate the HDFView path in the system path, the "PATH too long installer unable to modify PATH!" error occurs:

The solution is to clean up and shorten the system path prior to the HDFView installation or to not choose to add the HDFView path to the system path. There are many pages on the web describing how to set the system path on windows. A very nice page can be found here.

Windows installer cannot be executed without administrator permissions

The Windows installer requires administrator permissions and cannot be executed without them.

Using a system installed JRE with HDFView

The HDFView scripts in the HDFView install folder under the bin directory can be changed to use a system installed JRE on Windows and Linux.

Following are the instructions for using a system installed JRE:

Windows:

Linux:


How to Build HDFView from Source

Below are the instructions for building HDFView from source. Please note that you need both ant and CMake.


Compile an Application

To compile an application you must set the following environment variables:

A simple shell script or batch file can be created to compile applications. See the example script below.

To use this script you must add the correct path to the following variables:

When compiling with the script, leave off the application extension. For example if the script is called "runlin.sh", you would type the following to compile "program.java":

   ./runlin.sh program

Example Compile Script (Unix):

#!/bin/sh

export HDFJAVA_HOME=
export JAVAPATH=

######################################################

CPATH=$HDFJAVA_HOME"/lib/*"
export CLASSPATH=$CPATH":"$CLASSPATH
export LD_LIBRARY_PATH=$HDFJAVA_HOME"/lib"
echo $CLASSPATH

$JAVAPATH/javac  $1.java
$JAVAPATH/java -Xmx1G  -Djava.library.path=$HDFJAVA_HOME"/lib" $1 dummy.h5


Example Programs

HDF-Java applications can be found on the HDF5 Examples page.

The HDF5 Java Examples by API page contains examples that use both the JHI5 and the Object package. If running these examples individually you must comment out this line at the top:

   package examples....


- - Last modified: 27 July 2017