[英]Java comm not listing serial ports - Windows XP
I have a web app that runs under Tomcat on Windows XP that needs to use serial ports.我有一个 web 应用程序,它在 Windows XP 上的 Tomcat 下运行,需要使用串行端口。 It works fine on our existing systems.它在我们现有的系统上运行良好。 I'm now trying to install it all on a new Windows XP machine.我现在正尝试将它全部安装在新的 Windows XP 机器上。 Everything in the install goes fine but the CommPortIdentifier.getPortIdentifiers() returns an empty list.安装中的一切正常,但 CommPortIdentifier.getPortIdentifiers() 返回一个空列表。 The serial ports are present and I've tested them with loopback tests using Putty.串行端口存在,我已经使用 Putty 通过环回测试对其进行了测试。 I'm aware that the location of the 3 java comm files is critical, they are in these locations below.我知道 3 个 java 通信文件的位置很关键,它们位于下面的这些位置。 What could be wrong?有什么问题?
Volume in drive C has no label. Volume Serial Number is C4DF-BEB3 Directory of C:\xxx\WEB-INF\lib 06/07/2011 09:55 AM 28,043 comm.jar 1 File(s) 28,043 bytes Total Files Listed: 1 File(s) 28,043 bytes 0 Dir(s) 8,122,056,704 bytes free Volume in drive C has no label. Volume Serial Number is C4DF-BEB3 Directory of C:\xxx\WEB-INF\classes 06/07/2011 09:55 AM 484 javax.comm.properties 1 File(s) 484 bytes Directory of C:\jre1.6.0_22\lib 06/07/2011 09:55 AM 484 javax.comm.properties 1 File(s) 484 bytes Directory of C:\tomcat-5.5\bin 06/07/2011 09:55 AM 484 javax.comm.properties 1 File(s) 484 bytes Directory of C:\tomcat-5.5\common\lib 06/07/2011 09:55 AM 484 javax.comm.properties 1 File(s) 484 bytes Total Files Listed: 4 File(s) 1,936 bytes 0 Dir(s) 8,122,052,608 bytes free Volume in drive C has no label. Volume Serial Number is C4DF-BEB3 Directory of C:\xxx\WEB-INF\lib 06/07/2011 09:55 AM 27,648 win32com.dll 1 File(s) 27,648 bytes Directory of C:\tomcat-5.5\bin 06/07/2011 09:55 AM 27,648 win32com.dll 1 File(s) 27,648 bytes Directory of C:\tomcat-5.5\common\lib 06/07/2011 09:55 AM 27,648 win32com.dll 1 File(s) 27,648 bytes Total Files Listed: 3 File(s) 82,944 bytes 0 Dir(s) 8,122,052,608 bytes free
Do you have the native library in the right place?你在正确的地方有本地库吗? Where is the win32com.dll
file? win32com.dll
文件在哪里? It should be in the jre/bin
folder.它应该在jre/bin
文件夹中。
EDIT: ah.编辑:啊。 I see it.我看到了。 Add that to the jre/bin
folder and you should be good.将其添加到jre/bin
文件夹中,您应该会很好。
Sun's Communication API not worked on my Windows XP SP3 and Windows Server 2008, but RXTX worked well on both of them, its easy to migrate source code, just change javax.comm.* import packages to gnu.io.*. Sun's Communication API not worked on my Windows XP SP3 and Windows Server 2008, but RXTX worked well on both of them, its easy to migrate source code, just change javax.comm.* import packages to gnu.io.*.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.