Java(tm) Communications API Win32 Installation Instructions

Version 2.0

License

  1. Unzip the file javacomm20-win32.zip. This will produce a hierarchy with a top level directory commapi.

    The examples in this document assume that you have unzipped the javacomm20-win32.zip file in your C: partition and your JDK installation is in C:\jdk1.1.6. If you have installed JDK in an other location or unzipped javacomm20-win32.zip in an other location modify the example commands appropriately.

    If you are installing the Java communications API into a JRE (Java runtime environment) follow the same instructions as for the JDK except where noted. See the additional instructions for running using the JRE.

  2. Copy win32com.dll to your <JDK>\bin directory.

    C:\>copy c:\commapi\win32com.dll to c:\jdk1.1.6\bin

  3. Copy comm.jar to your <JDK>\lib directory.

    C:\>copy c:\commapi\comm.jar c:\jdk1.1.6\lib

  4. Copy javax.comm.properties to your <JDK>\lib directory.

    C:\>copy c:\commapi\javax.comm.properties c:\jdk1.1.6\lib

    The javax.comm.properties file must be installed. If it is not, no ports will be found by the system.

  5. Add comm.jar to your classpath (do not do this step for a JRE installation).
  6. Several serial port sample applications are provided with this release. One of them is BlackBox. To run BlackBox, first add BlackBox.jar to your classpath:

    C:\>set CLASSPATH=c:\commapi\samples\Blackbox\BlackBox.jar;%CLASSPATH%

    Now you can run BlackBox:

    C:\>java BlackBox

  7. One sample driver, NullDriver, is included in the samples\NullDriver directory. This is useful for folks attempting to write a new driver for their own hardware.

Running with the JRE

Use the -cp option to the JRE to specify the path to the comm.jar file and to your application.

C:>\JRE\bin\jre -cp c:\JRE\jre\lib\comm.jar;c:\commapi\samples\Blackbox\BlackBox.jar BlackBox

The javax.comm.properties file must be correctly installed (in the <jdk>\lib directory, see above for more details ) or no ports will be found.


API Documentation

The javadocs directory contains the API documentation generated by javadoc(1) from comments in the source code. To view the HTML files, point your browser at the main documentation page, javadocs\packages.html.


Notes

We have very limited support for parallel ports in this release.

There may be an incompatibility when running on a JRE if the Java plugin is installed on the system.


Copyright © 1998 Sun Microsystems, Inc.
All Rights Reserved.