How do I run the 32-bit API on a 64 bit computer?

I'm writing a Java application that must communicate with it. It must communicate with XBee radio through USB cable To do this, I use the XBee Java API( http://code.google.com/p/xbee-api/ )

On my old 32 - bit machine, everything is fine However, when I import the project into a 64 bit computer, it will immediately throw an exception, which reads: "unable to load ia 32-bit. DLL on AMD 64 bit platform" I don't know how to solve the problem

Error code:

java.lang.UnsatisfiedLinkError: C:\Users\Tom\Documents\XbeeJava\rxtxSerial.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform thrown while loading gnu.io.RXTXCommDriver
Closing connection with local XBee
Exception in thread "Thread-1" java.lang.UnsatisfiedLinkError: C:\Users\Tom\Documents\XbeeJava\rxtxSerial.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(UnkNown Source)
    at java.lang.ClassLoader.loadLibrary(UnkNown Source)
    at java.lang.Runtime.loadLibrary0(UnkNown Source)
    at java.lang.System.loadLibrary(UnkNown Source)
    at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
    at com.rapplogic.xbee.RxTxSerialComm.openSerialPort(RxTxSerialComm.java:71)
    at com.rapplogic.xbee.RxTxSerialComm.openSerialPort(RxTxSerialComm.java:61)
    at com.rapplogic.xbee.api.XBee.open(XBee.java:140)
    at me.server.HardwareCommunications.SensorListener.run(SensorListener.java:47)
    at java.lang.Thread.run(UnkNown Source)

Thank you, Tom

Solution

Unable to load 32 - bit DLL into 64 - bit process

According to the description, the JVM you are running is 64 bit, but the DLL rxtxserial DLL is 32 bits To solve this problem, either:

>Get 64 bit rxtxserial DLL, or > use the current rxtxserial DLL to install and use a 32-bit JVM

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>