Page 1 of 1

Error "initialize class" on Matlab

Posted: Thu Jun 02, 2022 8:49 am
by thlagoute
Hello,

I am working with IMU and EMG and I try to convert .c3d files in suitable files for OpenSim by using Matlab r2022a.

When I run "configureOpenSim", it shows that the installation succeed. Yet, when I test
org.opensim.modeling.opensimCommon.GetVersion() , I get the following error message :

Failed to load one or more dynamic libraries for OpenSim.
java.lang.UnsatisfiedLinkError: C:\OpenSim 4.3\bin\osimJavaJNI.dll: Can't find dependent libraries
Make sure OpenSim's bin directory is on your PATH.
See https://simtk-confluence.stanford.edu/d ... ith+Matlab
Java exception occurred:
java.lang.UnsatisfiedLinkError: org.opensim.modeling.opensimCommonJNI.swig_module_init()V

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

at org.opensim.modeling.opensimCommonJNI.<clinit>(opensimCommonJNI.java:3149)

at org.opensim.modeling.opensimCommon.GetVersion(opensimCommon.java:25)


Java exception occurred:
java.lang.NoClassDefFoundError: Could not initialize class org.opensim.modeling.opensimCommonJNI

at org.opensim.modeling.opensimCommon.GetVersion(opensimCommon.java:25)


I post my question here as I did not manage to find any further information elsewhere. I checked the path; the "bin" and "Utilities" folders are already in. I uninstalled Matlab 2021 which had the same error.

Thanks for your time and consideration.
Thomas

Re: Error "initialize class" on Matlab

Posted: Fri Jun 03, 2022 5:46 am
by tkuchida
If you had OpenSim 3.3 installed, you may need to remove the OPENSIM_HOME environment variable. You could also check the Matlab path. A similar issue was reported and resolved in Topic 9993: viewtopicPhpbb.php?f=91&t=9993