java.lang.UnsatisfiedLinkError, mach-o but wrong architecture on Mac10.6.2
Posted
by Yinan
on Stack Overflow
See other posts from Stack Overflow
or by Yinan
Published on 2010-02-17T16:44:05Z
Indexed on
2010/05/22
20:10 UTC
Read the original article
Hit count: 313
I was trying to run a project in my local machine.
I tried to load this jnilib file which I got from a running instance of this project on my Mac 10.6.2,
System.load(lib.getAbsolutePath());
then I got this exception thrown:
java.lang.UnsatisfiedLinkError, mach-o but wrong architecture
I have check the jnilib with file command:
libScreenMatchProxy.jnilib: Mach-O dynamically linked shared library i386
I guess this is because the jnilib file is compiled in 32bit but the Java comes with Mac10.6 is 64bit. So I go to Java Preference and set Java to use 32bit first. But it didn't work.
As mentioned above, this jnilib file is copied from a running instance of the project on my Mac, so it should work. I don't understand why it working in the installed application but not in my Eclipse.
© Stack Overflow or respective owner