We have 2 Free Java libraries for HDF5:

1) The "NCSA" lib distributed by hdfgroup.org with classes in namespace
ncsa.hdf.hdf5lib, packaged on Debian as libjhdf5-java.

2) The "CISD" aka. "SIS" lib distributed by ethz.ch with classes in the
namespace ch.systemsx, not currently packaged on Debian.

The SIS library forks some Java code from the ncsa.hdf namespace, and
also needs to link against the NCSA native library (via JNI) at runtime.

So, trying to package sis-jhdf5:

The 'source' distribution' linked on the web page only have the Java source.
The real source you need is in SVN:

svn co http://svncisd.ethz.ch/repos/cisd/jhdf5/trunk/

For compilation to succeed, we also need sis-base, not to be confused
with the entirely separate project at sis.apache.org!

http://svncisd.ethz.ch/repos/cisd/base/trunk/
See the libsis-base-java package for this.

The code also depends on their own args4j library, but only for the CLI
under ch/systemsx/cisd/hdf5/h5ar/HDF5ArchiverMain.java which we can
simply leave out just now.  I delete it from jsrc/ before compiling and
also leave out the h5ar.sh script which invokes it.  Once args4j is packaged
this can be reinstated and the h5ar command can be added to /usr/bin
( http://bs-svn01.ethz.ch/repos/cisd/libraries/trunk/cisd-args4j/ )

So - can we exclude the ncsa.hdf.hdf5lib.* classes from sis-jhdf5 and
compile it against the existing classes in /usr/share/java/jhdf5.jar?
My conclusion is not, because...

The version of ncsa/hdf/hdf5lib/exceptions/HDF5Exception.java supplied
with the sis-jhdf5 code subclasses RuntimeException but the version in
libhdf5-java does not.  The result is that the code here does not need
to declare the exceptions being thrown, and thus simply ignores them
all.  One can go through and add all "throws" declarations (there are a
_lot_ of them!!), but then any client code using the library will also
break unless it is likewise patched or the code is modified to handle
the exceptions internally. I think we'd best just admit defeat here and
use the code supplied with sis-jhdf5.

So, I'm going to try rolling two new packages, and see if that allows me
to compile the latest FastQC:

libsis-base-java (should be simple)
libsis-jhdf5-java (depends on libsis-base-java + libhdf5, but ignores
                   existing libjhdf5-jni package)

-- Tim Booth on 12th Aug 2015
