Can't load IA 32-bit .dll on a AMD 64-bit platform
Solution 1
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.
Solution 2
I had the same issue with a Java application using tibco dll originally intended to run on Win XP. To get it to work on Windows 7, I made the application point to 32-bit JRE. Waiting to see if there is another solution.
Solution 3
Short answer to first question: yes.
Longer answer: maybe; it depends on whether the build process for SVMLight behaves itself on 64-bit windows.
Final note: that call to System.loadLibrary is silly. Either call System.load with a full pathname or let it search java.library.path.
Solution 4
Got this from - http://blog.cedarsoft.com/2010/11/setting-java-library-path-programmatically/
If set the java.library.path, need to have the following lines in order to work.
Field fieldSysPath;
fieldSysPath = ClassLoader.class.getDeclaredField( "sys_paths" );
fieldSysPath.setAccessible( true );
fieldSysPath.set( null, null );
Solution 5
Just go to install download jdk_x86 and it install in Program Files (x86) and set the jre path in your project. Thats it.
![Nick Heiner](https://i.stack.imgur.com/3bnPx.jpg?s=256&g=1)
Nick Heiner
JS enthusiast by day, horse mask enthusiast by night. Talks I've Done
Updated on July 09, 2022Comments
-
Nick Heiner almost 2 years
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.
-
Nick Heiner over 12 yearsHow can I switch to a 32 bit JVM? Is that an argument I can pass, or do I need to download and configure something new?
-
Artem over 12 yearsDownload and install a 32-bit jvm.
-
Nick Heiner over 12 yearsI asked multiple questions. Which are you answering "yes" to? ha.
-
Daniel Pryden over 12 years@Rosarch: Yup, a 64-bit machine can run 32-bit executables. That will be the easiest way to get a 32-bit DLL to work.
-
vikingsteve over 8 yearsMaybe you mea to "use a jvm that is found under Program Files (x86), to ensure it's a 32 bit version" ??
-
Janac Meena almost 7 yearsHi can you elaborate on how you got your app to point to 32-bit JRE? Is that something you did in your IDE or programmatically?
-
FiruzzZ over 5 yearsthat's not possible, the location of the file doesn't change anything
-
John Perry over 2 years"Yes, you'll have to recompile the DLL for 64-bit." How?