Missing Constant in HDF5Constants in HDFView 3.0.0?


#1

Based on the this answer in a different thread by @dave.allured I wanted to try setting the library version boundaries in my Java HDF5 writer using

((H5File)file).setLibBounds(
    HDF5Constants.H5F_LIBVER_EARLIEST
   ,HDF5Constants.H5F_LIBVER_V18
);

However, H5F_LIBVER_V18 is not defined in the version of HDF5Constants.java that comes with the binaries of HDFView3.0.0, despite being in HDF5Constants.java of HDF5\1.10.4\src\java\src\hdf\hdf5lib\.

Am I missing something here? Shouldn’t HDF5Constants.H5F_LIBVER_V18 and HDF5Constants.H5F_LIBVER_V110 be accessible from the HDFView.jar library that comes with HDFView3.0.0?

By the way, there is a constant H5File.LIBVER_V18 according to the API.


Edit:

Also, when I set

((H5File)file).setLibBounds(
    HDF5Constants.H5F_LIBVER_EARLIEST
   ,HDF5Constants.H5F_LIBVER_EARLIEST
);

I still get a HDF5 1.10.X file:

System.out.println("test: " + file.getLibversion());

gives:

test: HDF5 1.10.1

I would expect that to be 1.8.X.


#2

HDF5Constants.H5F_LIBVER_* are from the hdf5 java library, which would need to be imported.
HDFView imports those constants into H5File as H5File.LIBVER_*.

Allen


#3

Hello @byrn, could you tell me explicitely what I have to import? My current setting is import:

  • HDFView.jar
  • slf4j-simple-1.7.5.jar

and setting -Djava.library.path="[MYPATH]\HDF_Group\HDFView\3.0.0\lib\". This way, I do find

HDF5Constants.H5F_LIBVER_EARLIEST
HDF5Constants.H5F_LIBVER_LATEST

but not

HDF5Constants.H5F_LIBVER_V18
HDF5Constants.H5F_LIBVER_V110

For the latter two, I get Cannot find symbol.