fred basset
fred basset

Reputation: 10092

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. It works fine on our existing systems. I'm now trying to install it all on a new Windows XP machine. Everything in the install goes fine but the CommPortIdentifier.getPortIdentifiers() returns an empty list. The serial ports are present and I've tested them with loopback tests using Putty. I'm aware that the location of the 3 java comm files is critical, they are in these locations below. 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

Upvotes: 2

Views: 1711

Answers (2)

digz6666
digz6666

Reputation: 1828

Try RXTX library.

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.*.

Upvotes: 0

Femi
Femi

Reputation: 64700

Do you have the native library in the right place? Where is the win32com.dll file? It should be in the jre/bin folder.

EDIT: ah. I see it. Add that to the jre/bin folder and you should be good.

Upvotes: 1

Related Questions