you need to set the HDF library path.
If you are running your application from your script, add the library to
the command line, e.g.
java -Djava.library.path=%PATH_TO_THE_DLLS% ...
If you are running with eclipse, set VM argument,
-Djava.library.path=%PATH_TO_THE_DLLS%
under run->Run Configurations->Arguments
On 5/14/2013 8: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