Conny,

You need to add the HDF5 JNI library to your path.

In Eclipse, go to "Run" --> "Run Configurations...". Select the program to run and add
the path at VM arguments, e.g.

Add the path
-Djava.libary.path=G:\Projects\Java\hdf-java\native\hdf5lib

Or add the specific library
-Dncsa.hdf.hdf5lib.H5.hdf5lib=G:\Projects\Java\hdf-java\native\hdf5lib\jhdf5.dll

Thanks
--pc


On 5/24/2011 5:13 AM, blatoo wrote:
Hi all,

I'm new in HDF5, and I am a Java, Ubungtu-32bit 11.4, Eclipse user. But I
can't run the java intro-examples  on my computer.

I have downloaded the "hdf-java-2.7-bin.tar", and extracted it. Then, I add
all the jar Files in the "haf-java ->  lib" to my Project.

Then I copy the example file "H5_CreateDataset.java" into my Project, but it
doesn't work!!! The Error are:

Exception in thread "main" java.lang.UnsatisfiedLinkError:
ncsa.hdf.hdf5lib.HDF5Constants.H5_INDEX_UNKNOWN()I
        at ncsa.hdf.hdf5lib.HDF5Constants.H5_INDEX_UNKNOWN(Native Method)
        at ncsa.hdf.hdf5lib.HDF5Constants.<clinit>(HDF5Constants.java:40)
        at H5_CreateDataset.CreateDataset(H5_CreateDataset.java:21)
        at H5_CreateDataset.main(H5_CreateDataset.java:77)

That means here is wrong:
file_id = H5.H5Fcreate(FILENAME, HDF5Constants.H5F_ACC_TRUNC,                   
HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);"

I can't create a file! Why???

Thanks!

Conny

--
View this message in context: 
http://hdf-forum.184993.n3.nabble.com/How-to-use-hdf5-for-java-in-Eclipse-tp2979006p2979006.html
Sent from the hdf-forum mailing list archive at Nabble.com.

_______________________________________________
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