Can't load IA 32-bit .dll on a AMD 64-bit plat

2019-02-01 04:27发布

I am trying to use SVMLight from Java, using the JNI wrapper on this page:

  static {
    System.loadLibrary("lib/JNI_SVM-light-6.01/lib/svmlight");
  }

I get the following error:

... lib\JNI_SVM-light-6.01\lib\svmlight.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform

Can I solve this by recompiling the .dll for 64 bit? How would I go about doing this? Is there some other workaround I can use? SVMLight makes the C source code available.

13条回答
兄弟一词,经得起流年.
2楼-- · 2019-02-01 04:50

I had an issue related to this and was reading

"Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\opencv\build\java\x86\opencv_java2413.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform "and it took me an entire night to figure out.

I solved my problem by copying the dll in C:\opencv\build\java\x64 to my system32 folder. I hope this will be of help to someone.

查看更多
Viruses.
3楼-- · 2019-02-01 04:54

Yes, you'll have to recompile the DLL for 64-bit. Your only other option is to switch to a 32-bit JVM, or otherwise get some 32-bit process to load the DLL on your behalf and communicate with that process somehow.

查看更多
爷、活的狠高调
4楼-- · 2019-02-01 04:55

Don't worry about you should just change .dll from x64 to x86, in the native library.

for example:- you might have selected this (C:\opencv\build\java\x64).

instead you select this for native library(C:\opencv\build\java\x86).

查看更多
趁早两清
5楼-- · 2019-02-01 04:56

Had same issue in win64bit and JVM 64bit

Was solved by uploading dll to system32

查看更多
疯言疯语
6楼-- · 2019-02-01 04:56

Be sure you are setting PATH to Program Files (x86) not Program Files. That solved my problem.

查看更多
一纸荒年 Trace。
7楼-- · 2019-02-01 04:56

My windows laptop has both the clients 32 & 64 bit i started facing all of sudden then i reordered the path variable like below

Before:

C:\app\oracle64\product\12.1.0\client_1\bin;
C:\app\oracle32\product\12.1.0\client_1\bin;

After:

C:\app\oracle32\product\12.1.0\client_1\bin;
C:\app\oracle64\product\12.1.0\client_1\bin;

started working... Hope this helps everyone.

查看更多
登录 后发表回答