To use the features that JCA provides, you need to configure the javax.comm package and the setup environment to execute your communication applications. To install JCA and configure the package setting:
Download the Javacomm20-win32 JCA, which is available in zip format at:
http://java.sun.com/products/javacomm/downloads/index.html
Unzip javacomm20-win32.zip in the C drive.
Copy win32comm.dll to the %JAVA_HOME%\bin directory. %JAVA_HOME% represents the directory that stores JDK on the computer. To copy win32comm.dll, specify the following command at the command prompt:
C:\>copy c:\commapi\win32com.dll %JAVA_HOME%\bin
Copy the comm.jar file to the %JAVA_HOME%\lib directory by specifying the following command at the command prompt:
C:\>copy c:\commapi\comm.jar %JAVA_HOME%\lib
Copy javax.comm.properties to the %JAVA_HOME%\lib directory by specifying the following command at the command prompt:
C:\>copy c:\commapi\javax.comm.properties %JAVA_HOME%\lib
Add the comm.jar file to your classpath by specifying the following command at the command prompt:
set classpath = %classpath%;%JAVA_HOME\lib; %JAVA_HOME\jre\lib\ext\comm.jar;