Java.lang.UnsatisfiedLinkError, mach-o, but the wrong architecture on Mac10.6.2

I tried to run the project on my local machine.

I tried to download this jnilib file that I got from a working instance of this project on my Mac 10.6.2,

System.load(lib.getAbsolutePath());

then I got this exception:

java.lang.UnsatisfiedLinkError, mach-o but wrong architecture

I checked jnilib with the file command:

libScreenMatchProxy.jnilib: Mach-O dynamically linked shared library i386

I assume this is because the jnilib file is compiled to 32 bits, but Java comes with Mac10.6, 64-bit. So I switch to Java Preference and first install Java on 32bit. But that did not work.

As mentioned above, this jnilib file is copied from a working instance of the project on my Mac, so it should work. I do not understand why it works in the installed application, but not in my Eclipse.

+3
1

"-d32" VM , Eclipse Java 32- . .

+3

Source: https://habr.com/ru/post/1733234/


All Articles