如何使用Java通过USB端口与设备通信? [英] How can I use Java to communicate to device through USB port?

查看:1063
本文介绍了如何使用Java通过USB端口与设备通信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近刚学习Java并尝试通过USB端口连接与设备进行通信。我已经使用C#和OpenNETCF,它允许我通过USB端口在设备上发送文件和检索文件;我怎样才能用java实现这个目标?

I just recently learn Java and try to communicate to the device through USB port connection. I've have used C# with OpenNETCF which allows me to send file and retrieve file on the device through USB port; how can I achieve this with java?

我在stackoverflow线程上看到了,如何在Windows和Java下与USB设备进行通信?,christoffer发表的评论是破解本机代码,但我不知道哪个本机代码api他提到过。 RAPI,也许?

I seearch on stackoverflow thread, How to communicate with a USB device under Windows and Java?, the comment made by christoffer is to hack the native code, but I don't quite which native code api that he referred to. RAPI, maybe?

推荐答案

我能为Windows找到唯一的USB API 在这里。似乎它的功能有限,但它可能适合您的需求。还提供了更完整的 UNIX API

The only USB API I could find for Windows is here. Seems as if it has limited functionality, but it might suit your needs. A more complete UNIX API is also available.

ETA :找到官方 Java USB实施的链接,但看起来像Windows版本仍然是alpha版。

ETA: Found a link to the official Java USB implementation, but looks like the windows version is still in alpha.

这篇关于如何使用Java通过USB端口与设备通信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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