Error loading win32com: java.lang.UnsatisfiedLinkError: C:\Program Files\Java\jdk1.7.0_75\jre\bin\win32com.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform

i am getting above error while running my program....my program need to read rfid tag from rfid reader through USB-RS232 cable.

My system is 64bit windows7
my java version is also 64bit.
how to get rid of this error?

Dani AI

Generated

For : that error is an architecture mismatch — the native DLL being loaded is built for x86 while the JVM process is running as x64. A 64-bit JVM cannot load a 32-bit native DLL (and vice versa), so the solution is to make the DLL and the JVM match.

Quick checks to run from a Windows command prompt:

java -version
where java

java -version will show whether the running JVM is 32- or 64-bit; where java reveals which java.exe is being launched. To check the DLL itself, open it in Dependency Walker (depends.exe) or run Visual Studio Developer Command Prompt and inspect the headers to confirm machine type.

Practical fixes (pick one):

  • Switch to a 32-bit JVM: install a 32-bit JRE/JDK and start your app with that java.exe (or set JAVA_HOME/Path to the x86 JRE). This is the simplest when the vendor only supplies a 32-bit native library.
  • Get a 64-bit version of the native library from the RF ID/driver vendor and use it with your 64-bit JVM. This is preferable if you want to remain 64-bit.
  • Make sure the correct native DLL is on java.library.path or in your PATH. Note: on 64-bit Windows, C:\Windows\System32 holds 64-bit DLLs and C:\Windows\SysWOW64 holds 32-bit ones — placing a 32-bit DLL in the wrong folder causes confusion.

As suggested, reinstalling Java can help if multiple JREs are mixed on the machine, but it will not by itself fix a 32-vs-64 mismatch. Also verify the USB-RS232 adapter has the proper (x86 vs x64) driver and that the COM port appears in Device Manager. If no 64-bit native library is available and you cannot run 32-bit Java, consider contacting the device vendor for an x64 build or using a pure-Java serial solution or a small 32-bit helper process as a last resort.

I would suggest first remove all java installations, may be use CC Cleaner to clean up the registry, restart and then reapply java again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.