在 Java 中实现串行通信的最简单的“免费"方式是什么? [英] What is the simplest 'free' way to implement serial comms in Java?

查看:41
本文介绍了在 Java 中实现串行通信的最简单的“免费"方式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Java 新手,并为自己设置了一个项目来编写,以便我可以进行一些动手"学习.我精通 C++,但想在我的技能组合中添加另一种语言.

I'm new to Java, and have set myself a project to write so that I can do some "hands on" learning. I'm fluent with C++, but want to add another language to my skill-set.

无论如何,该项目的一部分包括串行通信.我的目标是 Windows XP 平台,这个项目并不真正需要跨平台.

Anyway, part of that project includes serial communications. I'm targeting a Windows XP platform, and cross-platform isn't really needed for this project.

我正在使用 NetBeans,在快速调查之后,我发现对串行通信的内置"支持不再存在.

I'm using NetBeans, and after quickly looking into things, I find that "in-built" support for serial communication doesn't exist any more.

进一步搜索使我找到了 RXTX,但是,在完成简单安装之后,他们列出的(在 wiki 上)示例似乎不起作用.

Further searching led me to RXTX, however, after following the simple installation, their listed (on the wiki) example doesn't appear to work.

我见过几个可购买的串行库,但我不想走那条路,至少现在还没有.

I have seen a couple of purchasable serial libraries, but I don't want to go down that path, at least not yet.

那么,最好的方法是什么?坚持使用 RXTX 并在那里进行故障排除?或者有没有更简单易用的替代方法?

So, what is the best way forward? Persisting with RXTX and troubleshooting there? Or is there an alternate way that is simpler to use?

推荐答案

来自 这里:

javax.comm 包 3.0 已取代 javax.comm 2.0:

javax.comm package 3.0 has replace javax.comm 2.0:

Sun 不再提供 javax.comm 的 2.0 版本,因为 3.0 Update1包含重要的错误修复,以便更好地支持它..

Sun is no longer offering the 2.0 release of javax.comm, since 3.0 Update1 contains important bug fixes allowing to better support it..

javax.comm 3.x 为用户提供了新的便利,以及端口映射架构的改进和对我们的支持Sun Ray 瘦客户端平台,没有更改核心 API 或功能.javax.comm 3.0 提供的功能之一是交互式串行端口工具,有助于串口连通性的基本诊断.

javax.comm 3.x offers new conveniences for the the user, as well as improvements to the portmapping architecture and support for our Sun Ray thin client platform, with no change to the core API or functionality. Among the features available with javax.comm 3.0 is an interactive serial port tool, which is helpful in basic diagnosis of serial port connectivity.

javax.comm for Windows 已停产:

javax.comm for Windows have been EOLed:

Sun 目前不提供 javax.comm 的 Windows 端口.有没有足够的需求来证明在 Windows 上支持 javax.comm,特别是考虑到 javax.comm for Windows 可从其他来源,例如 rxtx.

A Windows port of javax.comm is not currently offered by Sun. There has not been sufficient demand to justify supporting javax.comm on Windows, particularly considering that javax.comm for Windows is available from other sources, such as rxtx.

这篇关于在 Java 中实现串行通信的最简单的“免费"方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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