64 位 Windows 上的 Javax.comm API [英] Javax.comm API on 64-bit Windows

查看:24
本文介绍了64 位 Windows 上的 Javax.comm API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 javax.comm API 来帮助我的程序通过串行端口与硬件进行通信.我使用的是 Windows 7 和 NetBeans IDE 9.

I am using the javax.comm API to help my program communicate with hardware over serial port. I am using the Windows 7 and NetBeans IDE 9.

我使用通用 Java 程序检查我的 PC 上的可用端口.该程序编译并运行没有错误.然而它什么也没返回.

I used the common Java program to check the available ports on my PC. The program compiled and ran without error. However it returned nothing.

如何在 Windows 上使用 javax.comm API?看来 win32com.dll 不适用于 64 位操作系统.

What can I do to use the javax.comm API on Windows? It seems win32com.dll does not work with a 64-bit operating system.

推荐答案

这就是我让它工作的方式.
我已经在我的 Windows 7 64 位机器上使用 JDK 1.6(32 位)对其进行了测试.

This is how I got it to work.
I've tested it using JDK 1.6 (32bit) on my Windows 7 64bit machine.

  1. 安装 32 位 JDK.
  2. 将win32com.dll"复制到 JDK_HOMEjrein.
  3. 将'javax.comm.properties'复制到JDK_HOMEjrelib.
  4. 将 'comm.jar' 复制到 JDK_HOMEjrelibext.

现在运行你的程序,它应该可以工作了.

Now run your program and it should work.

这篇关于64 位 Windows 上的 Javax.comm API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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