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

查看:395
本文介绍了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_HOME \ jre \ bin。

  3. 将'javax.comm.properties'复制到JDK_HOME \\ \\ jre\lib。

  4. 将'comm.jar'复制到JDK_HOME \ jre \lib \ extra。

  1. Install 32bit JDK.
  2. Copy 'win32com.dll' to JDK_HOME\jre\bin.
  3. Copy 'javax.comm.properties'to to JDK_HOME\jre\lib.
  4. Copy 'comm.jar'to to JDK_HOME\jre\lib\ext.

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

Now run your program and it should work.

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

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