matlab: required library failed to load??

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Hao Lee
Posts: 32
Joined: Sun Jun 12, 2016 11:52 pm

matlab: required library failed to load??

Post by Hao Lee » Fri Oct 21, 2016 8:37 pm

I am new to opensim
I try write script in matlab, thus I ran the "configureOpenSim.m" as admin, and it told me to restart and test it with model=org.opensim.modeling.Model();

However, it pops out "Required library failed to load. Check that the dynamic library osimJavaJNI is in your PATH java.lang.Unsatisfied LinkError:C:\Projram Files\OpenSim 3.3\bin\osimJavaJNl.dll:Can't find dependent libraries

And error in matlab is

Java exception occurred:
java.lang.UnsatisfiedLinkError: org.opensim.modeling.opensimModelJNI.swig_module_init()V

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

at org.opensim.modeling.opensimModelJNI.<clinit>(opensimModelJNI.java:10698)

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

I check the openSim folder, there is osimJavaJNl.dll, and the opensim I install is 64 bit, the same as my matlab. I even modify the opensim.conf, change jdkhome="C:\Program Files\Java\jre1.8.0_112" or jdkhome="C:\Program Files(x86)\Java\jre1.8.0_112" (Not sure why I have two java folder, possible I download both 32 and 64 bit Java?)

User avatar
Hao Lee
Posts: 32
Joined: Sun Jun 12, 2016 11:52 pm

Re: matlab: required library failed to load??

Post by Hao Lee » Mon Oct 24, 2016 1:01 pm

to those who encounter the same problem as me
I solved it by manually add *install_directory*\OpenSim 3.2\bin\osimJavaJNI.dll into my environment parameter "Path"
Reason for doing that is I kept facing "unable to modify Path" (or sth like that), and see the warning that I originally posted.

POST REPLY