OS is Linux Ubuntu 16.04 LTS
(The application runs absolutely fine on Windows, I did not have to configure anything after the installation of Matlab Compiler SDK)
I am writing a web application in Java which also calls some functions written in Matlab which requires install Matlab Compiler SDK, after the installation, it told me to append this /usr/local/MATLAB/MATLAB_Runtime/v901/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v901/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v901/sys/os/glnxa64:
to the end of the LD_LIBRARY_PATH
variable, which I did by
export LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Runtime/v901/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v901/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v901/sys/os/glnxa64:
But why do I keep getting this error when I try to run the web app in Netbeans?
java.lang.UnsatisfiedLinkError: Failed to find the required library libmwmclmcrrt.so.9.0.1 on java.library.path.
This library is typically installed along with MATLAB or the MCR. Its absence may indicate an issue with that installation or the current path configuration.
libmwmclmcrrt.so.9.0.1
resides inside the /usr/local/MATLAB/MATLAB_Runtime/v901/runtime/glnxa64
directory
I also added -Djava.library.path
to point to 3 directory entries above to see if it helps, but it does not do anything good at all.
I read several posts on here, but did not seem to solve it.
- JNI: Library is Found on Path, but Method is not (java.lang.UnsatisfiedLinkError)
- java.lang.UnsatisfiedLinkError even on setting -Djava.library.path
How do I fix this? BTW, this is a web application