f



Java program using Matlab JA Builder can not find matlab libraries

Hi all:
We are trying to run a java program calling Matlab.  When we run our program, we get the following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Failed to find the library libmwmclmcrrt.7.10.dylib, required by MATLAB Builder JA, on java.library.path

Therefore we proceed and add the following VM argument:
-Djava.library.path=/Applications/MATLAB_R2009a.app/bin/maci/

Now we get a different error:

Exception in thread "main" java.lang.LinkageError: dlopen
(/Applications/MATLAB_R2009a.app/bin/maci/libnativemcl.jnilib, 9): 
Library not loaded: libtbb.dylib
Referenced from: /Applications/MATLAB_R2009a.app/bin/maci/libmwservices.dylib
Reason: image not found
at com.mathworks.toolbox.javabuilder.internal.DynamicLibraryUtils.dlopen(Native Method)

However all three of the above files are all in our 
/Applications/MATLAB_R2009a.app/bin/maci/ folder

/Applications/MATLAB_R2009a.app/bin/maci/libtbb.dylib 
/Applications/MATLAB_R2009a.app/bin/maci/libnativemcl.jnilib
/Applications/MATLAB_R2009a.app/bin/maci/libmwservices.dylib

Do you know what might be the problem?   Thank you!
0
biolinux (3)
3/20/2009 3:52:01 AM
comp.soft-sys.matlab 211266 articles. 23 followers. lunamoonmoon (257) is leader. Post Follow

3 Replies
2259 Views

Similar Articles

[PageSpeed] 32

On Mar 20, 4:52=A0am, "MatlabUser " <bioli...@yahoo.com> wrote:
> Hi all:
> We are trying to run a java program calling Matlab. =A0When we run our pr=
ogram, we get the following error:
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError: Failed to find=
 the library libmwmclmcrrt.7.10.dylib, required by MATLAB Builder JA, on ja=
va.library.path
>
> Therefore we proceed and add the following VM argument:
> -Djava.library.path=3D/Applications/MATLAB_R2009a.app/bin/maci/
>
> Now we get a different error:
>
> Exception in thread "main" java.lang.LinkageError: dlopen
> (/Applications/MATLAB_R2009a.app/bin/maci/libnativemcl.jnilib, 9):
> Library not loaded: libtbb.dylib
> Referenced from: /Applications/MATLAB_R2009a.app/bin/maci/libmwservices.d=
ylib
> Reason: image not found
> at com.mathworks.toolbox.javabuilder.internal.DynamicLibraryUtils.dlopen(=
Native Method)
>
> However all three of the above files are all in our
> /Applications/MATLAB_R2009a.app/bin/maci/ folder
>
> /Applications/MATLAB_R2009a.app/bin/maci/libtbb.dylib
> /Applications/MATLAB_R2009a.app/bin/maci/libnativemcl.jnilib
> /Applications/MATLAB_R2009a.app/bin/maci/libmwservices.dylib
>
> Do you know what might be the problem? =A0 Thank you!


I'm trying to run a JAbuilder deployed application in Eclipse and am
having the same problem. Did you manage to get a solution for it?
0
4/21/2009 12:05:04 PM
I was having the same problem. In my case, when using the created JAR file by MATLAB in the same computer where this file was created everything was alright but when using it in other one the related error appeared. The reason was that in this second computer I had an old version of the MCR. After installing the version provided by the MATLAB installation in the first computer the problem was fixed.

Hope this help to you.
0
splanet (3)
5/8/2009 10:43:01 AM
This post is a couple of months old but I thought i'd share my comments for future users.

I had the exact same problem and after about 8 hours of banging my head against the wall I finally came across this: 

http://www.mathworks.com/support/solutions/en/data/1-9DOEPT/index.html?product=CO&solution=1-9DOEPT

which solved the problem.

Regards,
Julian
0
7/15/2009 3:50:18 PM
Reply: