Difficult time building hdfview from sources


I gues this is an FYI…

I had a hard time building hdfview. I encountered numerous sets of instructions between the old and new support sites including one aimed at CMake build; variations due to 32 and 64 bit identifiers. I eventually wound up downloading and attempting to build all these pieces…


before I discovered the basic issue — HDF5 and HDF both need to be built with --eanble-java. I don’t see that described in most of the instructions I encountered.


Yes there has been a lot of development and not much cleanup.
The history of HDFView 2 (and references to hdf-java) are tied to hdf5 1.8 versions. This includes IDs as ints.
The JNI was pulled from HDFView2 and CMake build system into its own hdf-java project and HDFView 2.14 converted to ANT build system.
The introduction of hdf5 1.10 required that IDs be longs. We decided to include the java/JNI code inside the hdf and hdf5 source code (new option --enable-java for autotools and HDF5_BUILD_JAVA in CMake). These hdf library builds feed into HDFView 3 and use of ANT build system for HDFView 3.

Soon to be released is HDFView 3.0 based on HDF 4.2.14 and HDF5 1.10.3. This has been refactored to use the SWT UI interface instead of Swing. The class structures have been overhauled. HDF and HDF5 java libraries will need to be installed to build from source.

Now, we have not been able to address the loading of really large files - although it now opens read only by default. There are some Array of Strings and Array of Compounds issues, but most all other datatype combinations should display.



Ok, great to hear about read-only default change. I neglected to ask about one other thing…any chance you can make HDF(4) optional rather than required? And, probably the HDF(4) folks would like HDF5 optional too, I dunno? But, I’d rather not have to build HDF(4) when I don’t need it just to get this tool.


Actually, building from source does allow an HDF5 only build.


Ok, great! I didn’t try it because all instructions I had seemed to suggest both were required.


Of course, I was referring to the current development source - hdfview-3 branch of the hdfview repo.



We hope to provide clear build instructions for this next release.

Building from source will require hdf 4.2.14 (optional) and hdf5 1.10.3 binaries/installs.

There is a “build.properties” file that has environment variables for the user specific requirements. Either set the environment variables or replace with hard-coded paths.

Execute ant; some ant knowledge wrt targets may be needed, however executing “ant run” within the source folder will compile, create an executable jar and run HDFView 3.
“ant package” will create an install file.

That is the basics.



Ok, good.

BTW…the verbiage “…will require hdf 4.2.14 (optional)” is a tad confusing but I think you mean if hdf is used, version 4.2.14 is required. It won’t work with earlier versions of hdf, right?

Regarding the basics…I ran into problems with ant and the antcontrib jar file and I went googling. I think the problem I ran into is pretty common with ant in general and maybe even with ant+hdfview. At one point, I wound up having to hard-code the path to the antcontrib-1b03.jar file in one of the binary downloads from Apache into hdview’s build.xml file to get it to build. So, something to watch out for and simplify, if possible, going forward.


Correct, optional hdf4.
I think we removed the ant-contrib req.