using JHDF5 within Matlab?

Has anyone been able to successfully get the Java HDF5 library working
within MATLAB's JRE? I can't figure out what I'm doing wrong; I can't
even run a simple example that just opens and closes a file. It runs OK
standalone or in the Eclipse debugger, but not from MATLAB.

Any ideas appreciated; details are in this post on StackOverflow:

--Jason

···

_________________________________________________________________________________________

This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.

Hi Jason,

The error message shows that your application did not find the JNI
library. I don't know how to run Java application from MATLAB. Here
is how I link the JNI library in Eclipse:

-Dncsa.hdf.hdf5lib.H5.hdf5lib=G:\Projects\Java\hdf-java\native\hdf5lib\jhdf5.dll

Thanks
--pc

Jason Sachs wrote:

···

Has anyone been able to successfully get the Java HDF5 library working
within MATLAB's JRE? I can't figure out what I'm doing wrong; I can't
even run a simple example that just opens and closes a file. It runs OK
standalone or in the Eclipse debugger, but not from MATLAB.

Any ideas appreciated; details are in this post on StackOverflow:
http://stackoverflow.com/questions/1168567

--Jason

_________________________________________________________________________________________

This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.

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

Aha, thanks. I didn't know about the magic system property. That solves
it... how come I don't have to set the DLL path manually in my JAR file
when I just run it from Eclipse or from the command line?

Here's how to call java code from within MATLAB:

java.lang.System.setProperty('ncsa.hdf.hdf5lib.H5.hdf5lib',
jhdf5_dll_path_goes_here);
o = javaObject('my.class.name');
o.someMethod(someArgument1,someArgument2);

···

-----Original Message-----
From: hdf-forum-bounces@hdfgroup.org
[mailto:hdf-forum-bounces@hdfgroup.org] On Behalf Of Peter Cao
Sent: Friday, July 24, 2009 9:43 AM
To: hdf-forum@hdfgroup.org
Subject: Re: [Hdf-forum] using JHDF5 within Matlab?

Hi Jason,

The error message shows that your application did not find the JNI
library. I don't know how to run Java application from MATLAB. Here
is how I link the JNI library in Eclipse:

-Dncsa.hdf.hdf5lib.H5.hdf5lib=G:\Projects\Java\hdf-java\native\hdf5lib\j
hdf5.dll

Thanks
--pc

Jason Sachs wrote:

Has anyone been able to successfully get the Java HDF5 library working
within MATLAB's JRE? I can't figure out what I'm doing wrong; I can't
even run a simple example that just opens and closes a file. It runs

OK

standalone or in the Eclipse debugger, but not from MATLAB.

Any ideas appreciated; details are in this post on StackOverflow:
http://stackoverflow.com/questions/1168567

--Jason

_________________________________________________________________________________________

This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.

Hi Jason,

I don't know how it worked on your Eclipse setting. On possibility is that
you might set the property to the full path of the JNI library.

Jason Sachs wrote:

···

Aha, thanks. I didn't know about the magic system property. That solves
it... how come I don't have to set the DLL path manually in my JAR file
when I just run it from Eclipse or from the command line?

Here's how to call java code from within MATLAB:

java.lang.System.setProperty('ncsa.hdf.hdf5lib.H5.hdf5lib',
jhdf5_dll_path_goes_here);
o = javaObject('my.class.name');
o.someMethod(someArgument1,someArgument2);

-----Original Message-----
From: hdf-forum-bounces@hdfgroup.org
[mailto:hdf-forum-bounces@hdfgroup.org] On Behalf Of Peter Cao
Sent: Friday, July 24, 2009 9:43 AM
To: hdf-forum@hdfgroup.org
Subject: Re: [Hdf-forum] using JHDF5 within Matlab?

Hi Jason,

The error message shows that your application did not find the JNI
library. I don't know how to run Java application from MATLAB. Here
is how I link the JNI library in Eclipse:

-Dncsa.hdf.hdf5lib.H5.hdf5lib=G:\Projects\Java\hdf-java\native\hdf5lib\j
hdf5.dll

Thanks
--pc

Jason Sachs wrote:
  

Has anyone been able to successfully get the Java HDF5 library working
within MATLAB's JRE? I can't figure out what I'm doing wrong; I can't
even run a simple example that just opens and closes a file. It runs
    

OK
  

standalone or in the Eclipse debugger, but not from MATLAB.

Any ideas appreciated; details are in this post on StackOverflow:
http://stackoverflow.com/questions/1168567

--Jason
    
_________________________________________________________________________________________

This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.

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