简体   繁体   English

Java从串口读取数据

[英]Java Read Data From Serial Port

I wrote a Java Program to read serial port data using rxtx.我写了一个Java程序来使用rxtx读取串口数据。 It worked successfully in a 32 bit windows system of mine.However when i used the same code on 64 bit with rxtxcomm.jar and rxtxserial.dll changed it is not working.I downloaded the rxtx files from their site for 64 bit and still it is not working,it seems the dll is meant for 32 bit only .它在我的 32 位 Windows 系统中成功运行。但是,当我在 64 位上使用 rxtxcomm.jar 和 rxtxserial.dll 更改的相同代码时,它无法正常工作。我从他们的网站下载了 rxtx 文件 64 位,但仍然如此不工作,似乎 dll 仅适用于 32 位。 Is there a dll for 64 bit available?是否有 64 位的 dll 可用? I need help in this matter as code is working fine on 32 bit system.在这件事上我需要帮助,因为代码在 32 位系统上运行良好。 Thanks in advance.提前致谢。

download the rxtx for 64 bit from the link : http://mfizz.com/oss/rxtx-for-java从链接下载 64 位的 rxtx: http ://mfizz.com/oss/rxtx-for-java

Also the rxtxSerial.dll and rxtxParallel.dll for 64 bit is already present. 64 位的 rxtxSerial.dll 和 rxtxParallel.dll 也已经存在。

Please follow the installation instruction inside it.请按照里面的安装说明进行操作。

RXTX binary builds provided as a courtesy of Fizzed, Inc. ( http://fizzed.com/ ). RXTX 二进制构建由 Fizzed, Inc. ( http://fizzed.com/ ) 提供。 Please see http://fizzed.com/oss/rxtx-for-java for more information.请参阅http://fizzed.com/oss/rxtx-for-java了解更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM