【发布时间】:2019-05-29 07:15:53
【问题描述】:
我有一台没有 COMM 端口的笔记本电脑, 我需要升级一个软件来读取带有 RS-232 的称重设备。
我正在使用 VSPE 来模拟 COMM PORT ,但是这行返回给我的是空值;
Enumeration ports = CommPortIdentifier.getPortIdentifiers();
System.out.println("start Port List scanner");
while(ports.hasMoreElements())
我猜这是因为eclipse找不到windows dll。 win32com.dll 要么 rxtxSerial.dll
我必须复制到 Java Lib 和 Windows/System32 文件夹吗? 有什么方法可以告诉 eclipse 在哪里可以找到这些 dll 吗?
最好的问候
【问题讨论】:
-
在 Project > Properties: Java Build Path 中配置包含 DLL 的文件夹,在 Native library location 中的标签 Libraries i> 对应 JAR 的子节点。