Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems with library-loading (JavaBuilder-compiled jar) on Intel mac

6 views
Skip to first unread message

Mattias Holmqvist

unread,
Aug 17, 2009, 1:52:01 AM8/17/09
to
I'm using the JavaBuilder software to compile a Matlab file to a jar. When loading the jar in my Java-application, I'm having troubles with the dynamic libraries. I have an Intel mac and I have installed Matlab/MCR by following the installation instructions. Hence, I have files under: /Applications/MATLAB/MATLAB_Compiler_Runtime/v79/bin/maci/ but not under the directory shown in the stacktrace.

java.lang.UnsatisfiedLinkError: Can't load library: /Applications/MATLAB/MATLAB_Compiler_Runtime/v79/bin/mac/libnativemcl.jnilib
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1764)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1022)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.<clinit>(MWMCR.java:1497)
at magicsquare.MagicsquareMCRFactory.<clinit>(MagicsquareMCRFactory.java:99)
at magicsquare.Magicsquare.<init>(Magicsquare.java:50)
at se.dirac.liveinstaller.proxy.ProxyTest.generatePoints(ProxyTest.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


Nowhere have I entered that directory as a path to either libraries or bins. Why does the MCR look for libraries in that directory?

I also tried creating a symlink named mac->maci but it seems that the libraries are of the wrong architecture:

java.lang.UnsatisfiedLinkError: /Applications/MATLAB/MATLAB_Compiler_Runtime/v79/bin/maci/libnativemcl.jnilib: no suitable image found. Did find: /Applications/MATLAB/MATLAB_Compiler_Runtime/v79/bin/maci/libnativemcl.jnilib: mach-o, but wrong architecture /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/shared_bundle/JavaVM/libnativemcl.jnilib: stat() failed with errno=20 /Applications/MATLAB/MATLAB_Compiler_Runtime/v79/bin/maci/libnativemcl.jnilib: mach-o, but wrong architecture
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1881)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1761)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1022)
at com.mathworks.toolbox.javabuilder.internal.MWMCR.<clinit>(MWMCR.java:1497)
at magicsquare.MagicsquareMCRFactory.<clinit>(MagicsquareMCRFactory.java:99)
at magicsquare.Magicsquare.<init>(Magicsquare.java:50)
at se.dirac.liveinstaller.proxy.ProxyTest.generatePoints(ProxyTest.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Can anybody help me forward here?

Titus Edelhofer

unread,
Aug 17, 2009, 11:43:34 AM8/17/09
to

"Mattias Holmqvist" <mattias....@gmail.com> schrieb im Newsbeitrag
news:h6ar61$4bm$1...@fred.mathworks.com...

Hi,
could one of the following bug reports
http://www.mathworks.com/support/bugreports/457198
http://www.mathworks.com/support/solutions/en/data/1-3PYVA4/?solution=1-3PYVA4
http://www.mathworks.com/support/bugreports/414622
be the problem you face?

Titus


Mattias Holmqvist

unread,
Aug 17, 2009, 12:59:04 PM8/17/09
to
"Titus Edelhofer" <titus.e...@mathworks.de> wrote in message <h6btr8$cnn$1...@fred.mathworks.com>...

Hi!

Thanks for the reply. I've double-checked the settings for the packaging of the MCR and the environment variables but I could not found anything that I have not tried already.

One thing that comes to mind is that I have another version 2007b installed on this computer as well. The version I use now is 2008b. Can this be the cause any of the problems related to the dynamic libraries?

/Mattias

0 new messages