It may be the dependencies such as the hdf5 native libraries aren't being found by the path.

While debugging beforecalling H5File I put in code loading the jhdf5.dll by load instead of the production way loadLibrary:

.....
//System.loadLibrary("jhdf5");
System.load("<full local path to lib>jhdf5.dll");
....
where <full local path to lib> is c:\NetBeansProjects\hdf5\lib\

If it can't find something, this development style will spit out what can't be found

On 05/14/2013 09:52 AM, Marko Kurm wrote:
I'm trying to open/read an existing HDF5 file using the Java library. I have the "jhdf.dll" and "jhdf5.dll" files on the system path. The code I have in my main method is taken from the HDF samples, and looks like this:

H5File h5file = new H5File("C:\\dev\\workspaces\\hdf5\\hdf5\\src\\main\\java\\com\\vaisala\\hdf5\\hdf5_test.h5", HDF5Constants.H5F_ACC_RDONLY);

        try
        {
            // open file and retrieve the file structure
            h5file.open();
        }
        catch (Exception ex)
        {
            System.out.println(ex);
        }

When I run it, it throws the following exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: ncsa.hdf.hdf5lib.H5.H5Gget_obj_info_all(ILjava/lang/String;[Ljava/lang/String;[I[JI)I
at ncsa.hdf.hdf5lib.H5.H5Gget_obj_info_all(Native Method)
at ncsa.hdf.hdf5lib.H5.H5Gget_obj_info_all(H5.java:4588)
at ncsa.hdf.object.h5.H5File.depth_first(H5File.java:1617)
at ncsa.hdf.object.h5.H5File.loadTree(H5File.java:1554)
at ncsa.hdf.object.h5.H5File.open(H5File.java:1520)
at ncsa.hdf.object.h5.H5File.open(H5File.java:1464)
at ncsa.hdf.object.h5.H5File.open(H5File.java:825)
at com.vaisala.hdf5.TestH5File.main(TestH5File.java:24)

Any ideas what could be wrong?

Marko Kurm


_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to