I have a Java project that needs to load some native dynamic libraries.
I run a 64bit JVM, I need to load 64bit dynamic libraries but I get the following exception:
java.lang.UnsatisfiedLinkError: /Users/mariosangiorgio/Downloads/darwin_x86_64/libminisat.dylib: Library not loaded: @rpath/libjvm.dylib Referenced from: /Users/mariosangiorgio/Downloads/darwin_x86_64/libminisat.dylib Reason: no suitable image found. Did find: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries/../Libraries/libjvm.dylib: mach-o, but wrong architecture
These are the version of the JVM:
mariosangiorgio:MacOS/ $ java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06-451-11M4406)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01-451, mixed mode)
the library I need
$ lipo -info ibminisat.dylib
Non-fat file: libminisat.dylib is architecture: x86_64
and the library of my JVM, which is causing the problem:
$ lipo -info libjvm.dylib
Non-fat file: libjvm.dylib is architecture: i386
I don't know if it may be the cause of my issue but I am running everything from within Eclipse. Minisat is used by an Eclipse plugin.
Do you have any idea on where can I get the 64bit version of libjvm.dylib
or if there is another way I could solve this problem?