Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java bindings fails on Windows with Matlab 2024b after building from source #3958

Open
nickbianco opened this issue Nov 5, 2024 · 4 comments

Comments

@nickbianco
Copy link
Member

nickbianco commented Nov 5, 2024

Reported by Amir Esrafilian. After building OpenSim from source at main on Windows 11, installing the Java bindings (built using openjdk 23), and running configureOpenSim.m, trying to construct a model fails with the typical DLL load failure error:

Failed to load one or more dynamic libraries for OpenSim.
java.lang.UnsatisfiedLinkError: D:\Git_Win\EMG_COMAK\EMG-Assisted-COMAK-install\bin\osimJavaJNI.dll: A dynamic link library (DLL) initialization routine failed
Make sure OpenSim's bin directory is on your PATH.
See https://simtk-confluence.stanford.edu/display/OpenSim40/Scripting+with+Matlab
Java exception occurred:
java.lang.UnsatisfiedLinkError: org.opensim.modeling.opensimSimulationJNI.new_Model__SWIG_0()J
	at org.opensim.modeling.opensimSimulationJNI.new_Model__SWIG_0(Native Method)
	at org.opensim.modeling.Model.<init>(Model.java:840)

We confirmed that osimJavaJNI.dll exists in the bin folder, and that the bin folder is prepended to the system Path variable.

Currently investigating whether this is an issue with Matlab 2024b or something else.

@nickbianco
Copy link
Member Author

Installing the OpenSim 4.5 distribution via configureOpenSim.m works successfully.

@aymanhab
Copy link
Member

aymanhab commented Nov 5, 2024

jdk version lust match whatever version used by matlab or they need to be compatible.

@nickbianco nickbianco self-assigned this Nov 5, 2024
@aymanhab
Copy link
Member

For the record, local build works out of the box without issue on R2022a update 8

@nickbianco nickbianco removed their assignment Nov 12, 2024
@aymanhab
Copy link
Member

Will try the artifact built on ci using coretto as java sdk here #3965

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants