Javax.comm API on 64-bit Windows(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.
- 安装 32 位 JDK.
- 将win32com.dll"复制到 JDK_HOMEjrein.
- 将'javax.comm.properties'复制到JDK_HOMEjrelib.
- 将 'comm.jar' 复制到 JDK_HOMEjrelibext.
现在运行你的程序,它应该可以工作了.
Now run your program and it should work.
这篇关于64 位 Windows 上的 Javax.comm API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:64 位 Windows 上的 Javax.comm API


基础教程推荐
- 在 Java 中创建日期的正确方法是什么? 2022-01-01
- 如何在 JFrame 中覆盖 windowsClosing 事件 2022-01-01
- 大摇大摆的枚举 2022-01-01
- 从 python 访问 JVM 2022-01-01
- 多个组件的复杂布局 2022-01-01
- 如何在 Spring @Value 注解中正确指定默认值? 2022-01-01
- 验证是否调用了所有 getter 方法 2022-01-01
- Java Swing计时器未清除 2022-01-01
- Java 实例变量在两个语句中声明和初始化 2022-01-01
- 不推荐使用 Api 注释的描述 2022-01-01