如何运行作出了32位在64位机器上的API? [英] How to run an API made for 32-bit on a 64-bit machine?

查看:652
本文介绍了如何运行作出了32位在64位机器上的API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在写一个Java应用程序,它具有与过usb-cable.To一个的XBee无线通信做沟通,我使用的XBee-的Java API(的 HTTP://$c$c.google.com/p/xbee-api/

I'm writing a java application which has to communicate with has to communicate with an XBee radio over a usb-cable.To do this , I use the xbee-java API (http://code.google.com/p/xbee-api/)

在我的旧的32位机这一切工作的罚款。 但是,当我导入的项目,64位机,它将立即抛出一个异常,它说:无法加载IA 32位的.dll在AMD 64位平台。 我没有任何想法如何,我可以解决这个问题。

On my old 32-bit machine it all worked fine . But when I imported the project to a 64-bit machine , it throws immediately an exception which says :" Can't load IA 32-bit .dll on a AMD 64-bit platform" . I don't have any idea how I can solve this problem .

错误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)

谢谢,汤姆

推荐答案

这是不可能装载一个32位的DLL到64位进程。

It is not possible to load a 32-bit DLL into a 64-bit process.

根据描述,你正在运行的JVM是64位,但该DLL rxtxSerial.dll 是32位的。要解决,或者:

Based on the description, the JVM you are running is 64-bit but the DLL rxtxSerial.dll is 32-bit. To resolve, either:

  • 获取64位 rxtxSerial.dll
  • 在安装并使用32位JVM与当前 rxtxSerial.dll
  • Obtain 64-bit rxtxSerial.dll, or
  • Install and use 32-bit JVM with the current rxtxSerial.dll

这篇关于如何运行作出了32位在64位机器上的API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆