How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
问题描述
可能重复:
Windows 上的 Java 串行通信
朋友们,我想在 JAVA 中连接并传输数据到 COM PORT(虚拟或原始)?
Friends, I want to connect and transfer data to COM PORT (either virtual or original) in JAVA?
推荐答案
这个问题已经被问过很多次了:
This question has been asked and answered many times:
使用Java从串口读取文件
用Java读取串口
用Java从串口读取文件
是否有用于访问 Serial 的 Java 库或框架端口?
Windows 上的 Java 串行通信
参考一些.
我个人推荐 http://serialio.com 的 SerialPort - 它不是免费的,但非常值得任何商业项目的开发商(无版税)许可费.可悲的是,它不再是免版税的,而且 SerialIO.com 似乎已将自己重塑为硬件销售商.我不得不搜索有关 SerialPort 的信息.
Personally I recommend SerialPort from http://serialio.com - it's not free, but it's well worth the developer (no royalties) licensing fee for any commercial project. Sadly, it is no longer royalty free to deploy, and SerialIO.com seems to have remade themselves as a hardware seller; I had to search for information on SerialPort.
根据个人经验,我强烈建议反对 Sun、IBM 和 RxTx 实施,所有这些实施在 24/7 使用时都不稳定.有关详细信息,请参阅我对上述一些问题的回答.公平地说,自从我尝试 RxTx 以来,它可能已经走了很长一段路,尽管 Sun 和 IBM 的实现基本上已经被放弃了,即使在那时也是如此.
From personal experience, I strongly recommend against the Sun, IBM and RxTx implementations, all of which were unstable in 24/7 use. Refer to my answers on some of the aforementioned questions for details. To be perfectly fair, RxTx may have come a long way since I tried it, though the Sun and IBM implementations were essentially abandoned, even back then.
jSSC (Java 简单串行连接器),正如@Jodes 评论所建议的那样.
A newer free option that looks promising and may be worth trying is jSSC (Java Simple Serial Connector), as suggested by @Jodes comment.
这篇关于如何使用 JAVA 向 COM PORT 发送数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何使用 JAVA 向 COM PORT 发送数据?
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01
- C++ 和 Java 进程之间的共享内存 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01