Installing the Java Communications API in a Windows Environment
There are some tricks involved in getting the Java Communications API to correctly interact with the Windows system. Among the items that you download from Sun are three very important files:
1- comm.jar
2- win32com.dll
3- javax.comm.properties
For the JVM to recognize the serial ports, proper placement of these files is important. I’ve read lot’s of messages on the boards, tried various ways of placing these files in a Windows system, and have found the following installation methods to be effective:
comm.jar should be placed in:
%JAVA_HOME%/lib
%JAVA_HOME%/jre/lib/ext
win32com.dll should be placed in:
%JAVA_HOME%/bin
%JAVA_HOME%/jre/bin
%windir%System32
javax.comm.properties should be placed in:
%JAVA_HOME%/lib
%JAVA_HOME%/jre/lib
Once you’ve done this, compile and execute one of the sample programs provided by Sun to ensure that you’ve properly installed everything.
Running Example:
http://dn.codegear.com/article/31915