Page 1 of 1

Java library failed to load while trying to interface with MATLAB

Posted: Wed Jul 18, 2018 12:57 am
by karthick_ganesan
Dear All,
I tried to interface opensim with matlab. I followed the procedure given in the documentation page (manual as well as running the configureOpenSim script). While running sample code (simple optimizer example), It failed to load the java library. My opensim install directory\ bin is in the system path. Here is the screenshot of the error. Please give your suggestions to resolve this issue. Matlab version is R2015b.
error.png
error.png (7.97 KiB) Viewed 593 times
Thanks,
Karthick.

Re: Java library failed to load while trying to interface with MATLAB

Posted: Wed Jul 18, 2018 3:12 am
by tkuchida
Does your system path refer to more than one installation of OpenSim? Please see topic 5963 (viewtopicPhpbb.php?f=91&t=5963).

Re: Java library failed to load while trying to interface with MATLAB

Posted: Wed Jul 18, 2018 4:27 am
by karthick_ganesan
Thanks for your reply. Yes. I had multiple versions in the system path and I removed the older versions from the path. Now I get the following error.
Error using simpleOptimizerExample (line 31)
Java exception occurred:
java.io.IOException: Object: ERR- Could not open file testData\Arm26_Optimize.osim. It may not exist or you don't have
permission to read it.

at org.opensim.modeling.opensimModelJNI.new_Model__SWIG_2(Native Method)

at org.opensim.modeling.Model.<init>(Model.java:127)

Re: Java library failed to load while trying to interface with MATLAB

Posted: Wed Jul 18, 2018 5:09 am
by tkuchida
java.io.IOException: Object: ERR- Could not open file testData\Arm26_Optimize.osim. It may not exist or you don't have permission to read it.
Please see topic 8648 (viewtopicPhpbb.php?f=91&t=8648). You can also search the Forum for the text in the error message.

Re: Java library failed to load while trying to interface with MATLAB

Posted: Thu Jul 19, 2018 3:40 am
by karthick_ganesan
Thanks. It helped to fix the error. Also thanks for the tip for searching the forum for error messages.