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
基础教程推荐
- JPA惰性列表上的流 2022-01-01
- Java ECDSAwithSHA256 签名长度不一致 2022-01-01
- doFilter()是在servlet的工作完成之前还是之后执行的? 2022-01-01
- 如何在相机中应用自定义滤镜 [Surfaceview 预览]. 2022-01-01
- Maven:无效的目标版本:10 2022-01-01
- 将 double 转换为 Int,向下舍入 2022-01-01
- 在springboot中如何给mybatis加拦截器 2023-04-29
- 控制台应用程序中的 Java 键盘输入解析 2022-01-01
- 在java中使用xpath和selenium解析HTML表格数据 2022-01-01
- 将 Windows 证书导入 Java 2022-01-01
