Can't load IA 32-bit .dll on an AMD 64-bit platform is a generic error, which comes when a 64-bit process tries to load a 32-bit dll, but when it comes it's not that easy to resolve. One of my readers was getting this error tibrvnative.dll : Can't load IA 32-bit .dll on an AMD 64-bit when he was trying to install Tibco Rendezvous 8.2 on his Windows 8 HP Laptop. He was working on a Java application that was dependent upon Tibco Rendezvous for inter-process communication. After installing Tibco on his machine he was having a hard time running his Java application, first, he was getting errors like java.lang.UnsatisfiedLinkError: no tibrvnative in java.library.path and after resolving that he was getting a new error tibrvnative.dll: Can't find dependent libraries.
After a lot of research and trial and error, he found that the version he was trying e.g. Tibco Rendezvous 8.2 was not supported for Windows 8 operating system.
That installer was working fine on Windows 7 and XP but not working on Windows 8. At last, when he upgraded to the latest Tibco Rendezvous version 8.4.1, which was supposed to work on windows 8, he started getting a new error Can't load IA 32-bit .dll on an AMD 64-bit platform.
Frustrated with all these errors, he was about to give up, when he emailed me. I suggested trying running his Java application, which was using Tibco Rendezvous, with 32-bit JVM rather than 64-bit JVM, which he was initially running because of the 64-bit configuration of his notebook.
I also suggested him to execute sample programs from Tibco installation, before running your Java application, it's not only quick but also isolates the issue. Thankfully running on 32-bit JVM did work for him, which motivates me to post the solution here.
As I said, it's a general problem, where 32-bit dll is used by x64 based process e.g. JDK 1.7 x64 JVM, so It can come not only with Tibco Rendezvous but also with any other Java JNI application which is using the native library.
Ideally, you should get a version that is compatible to your operating system, architecture and JVM e.g. dll which are compiled as 64-bit, but if that's not an option then loading those dll by a 32-bit process is the next best solution.
The good thing about this whole issue is that you can run 32-bit JVM on the 64-bit machine. You just need to download the correct installer like jdk-7u40-windows-i586 which is meant for x86 windows machines. If you are running your program in Eclipse, then you also need to first configure this JRE as the preferred JRE among all installed JRE/JDK, and then let your project use this 32-bit JDK, instead of 64-bit ones.
On another note, you should always use the 64-bit version of any software if you are running on 64-bit architecture and 64-bit operating systems like Windows 8. I am not sure, if he had downloaded the 32-bit version of Tibco Rendezvous instead of the 64-bit version because all this error says is that Tibco was compiled for 32-bit and Java was running on a 64-bit machine.
After a lot of research and trial and error, he found that the version he was trying e.g. Tibco Rendezvous 8.2 was not supported for Windows 8 operating system.
That installer was working fine on Windows 7 and XP but not working on Windows 8. At last, when he upgraded to the latest Tibco Rendezvous version 8.4.1, which was supposed to work on windows 8, he started getting a new error Can't load IA 32-bit .dll on an AMD 64-bit platform.
Frustrated with all these errors, he was about to give up, when he emailed me. I suggested trying running his Java application, which was using Tibco Rendezvous, with 32-bit JVM rather than 64-bit JVM, which he was initially running because of the 64-bit configuration of his notebook.
I also suggested him to execute sample programs from Tibco installation, before running your Java application, it's not only quick but also isolates the issue. Thankfully running on 32-bit JVM did work for him, which motivates me to post the solution here.
How to fix tibrvnative.dll : Can't load IA 32-bit .dll on a AMD 64-bit platform? Example
Use 32-bit JDK for running Tibco or any other 32-bit dllAs I said, it's a general problem, where 32-bit dll is used by x64 based process e.g. JDK 1.7 x64 JVM, so It can come not only with Tibco Rendezvous but also with any other Java JNI application which is using the native library.
Ideally, you should get a version that is compatible to your operating system, architecture and JVM e.g. dll which are compiled as 64-bit, but if that's not an option then loading those dll by a 32-bit process is the next best solution.
The good thing about this whole issue is that you can run 32-bit JVM on the 64-bit machine. You just need to download the correct installer like jdk-7u40-windows-i586 which is meant for x86 windows machines. If you are running your program in Eclipse, then you also need to first configure this JRE as the preferred JRE among all installed JRE/JDK, and then let your project use this 32-bit JDK, instead of 64-bit ones.
On another note, you should always use the 64-bit version of any software if you are running on 64-bit architecture and 64-bit operating systems like Windows 8. I am not sure, if he had downloaded the 32-bit version of Tibco Rendezvous instead of the 64-bit version because all this error says is that Tibco was compiled for 32-bit and Java was running on a 64-bit machine.
A more common problem occurs when you run daily use Java software like Eclipse IDE into the 64-bit machine. You can run into issues like No Java virtual machine was found error, always prefer a trio of 64-bit for Eclipse, Java and Windows 8 if you can. The same rule applies to any other native library or software.
That's all guys, In short, if you ever get an error Can't load IA 32-bit .dll on a AMD 64-bit platform, use 32-bit JVM to run your native 32-bit dll. You may get this very same error in Windows 7 or Windows 8, which are two popular 64-bit operating system. Best is to get correct installer, but if it doesn't happen try this trick to solve "Can't load IA 32-bit .dll on a AMD 64-bit platform error" in Java based application.
This problem is popular when you work on 64-bit JVM and try to use 32-bit libs.
ReplyDeleteI remember when I had this problem with LeJOS on some project.
To be honest its not a hard-to-solve problem but still, there are times when you are exhausted by the whole day, you add some 32-bit lib on your 64-bit JVM getting in effect "Can't load IA 32-bit .dll on a AMD 64-bit" and have no clue what the friendly-word.
Anyway nice art.
If you have time could you make one about why use 64-bit JVM on 64-bit machines, it would be great. But it would be a long one I guess.