I’m trying to write code that retrieves single values from a 4-D dataset using the Java HDF Object Package. My code is working well right up until I request the dimensions of the dataset to prepare to do the read. The calls to getDims(), getSelectedDims(), getStartDims(), and getStride() are all returning null. When I look at the file in HDFView, everything looks great.
Java HDF Object Package from the HDFView 3.0.0 beta release on Windows 10, though I will be running this eventually on RHEL 7).
Please try the HDF-Java wrapper for HDF5 rather than the HDF-Java Object package. You should be
able to use the HDF-Java wrapper to subset a 4D dataset.
The HDF-Java Object package is limited in what it can do and targets common use-cases.
The HDF-Java wrapper for HDF5 is the native interface for Java HDF5 (JHI5), which “wraps around”
the HDF5 library. As of HDF5-1.10, HDF-Java is included with the HDF5-1.10 source code. See this
page for details:
I’ve managed to get 1.10.2 built using CMake (whew) and then installed with the MSI. Now I’m getting a failure when I run.
Thread [main] (Suspended (exception ClassNotFoundException))
Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: not available
Launcher$AppClassLoader.loadClass(String, boolean) line: not available
Launcher$AppClassLoader(ClassLoader).loadClass(String) line: not available
H5.() line: 230
HDF5Constants.() line: 29
VolumetricReaderDriver.main(String) line: 12
I reference “C:\Program Files\HDF_Group\HDF5\1.10.2\lib\jarhdf5-1.10.2.jar.”
I have VM argument -Djava.library.path=“C:\Program Files\HDF_Group\HDF5\1.10.2\lib”
I set environment variable PATH=“C:\Program Files\HDF_Group\HDF5\1.10.2\lib”