Unit Testing


To test the Fax application:

  1. Download the Javacomm20-win32 JCA, which is available in a zip format at:

    http://java.sun.com/products/javacomm/downloads/index.html

  2. Unzip the zip file downloaded from the above URL.

  3. Copy win32com.dll from the unzipped file to the jre\bin directory where J2SDK is installed.

  4. Copy comm.jar from the unzipped file to the jre\lib\ext directory where J2SDK is installed.

  5. Copy javax.comm.properties from the unzipped file to the jre\lib directory where J2SDK is installed.

  6. Set the path of the bin directory of J2SDK by executing the following command at the command prompt:

     set path=%path%;D:\j2sdk1.4.0_02\bin; 
  7. Set the classpath of the lib directory of J2SDK by executing the following command at the command prompt:

     set classpath = %classpath%;d:\j2sdk1.4.0_02\lib; d:\j2sdk1.4.0_02\jre\lib\ext\comm.jar; 

  8. Copy the Java files for the Fax application to a folder on your computer. Use the cd command at the command prompt to move to that folder. Compile the files using the javac command, as follows:

     javac *.java 
  9. Run the Fax application using the following command at the command prompt:

     java PortFax 
  10. Select File->Open to open the document that you want to send as a fax using the Fax application. The selected file opens in the edit pane of the Fax Application window, as shown in Figure 6-4:

    click to expand: this figure shows the fax application window with the selected file opened in the edit pane.
    Figure 6-4: The Fax Application Window

  11. Select the HTML check box if you want to send the fax document as an HTML page.

  12. Specify the fax number in the Fax Number text box.

  13. Select File->View Properties to set the properties of the port to which the modem is connected.

  14. Click the Send Fax button to send the document as a fax document.

  15. Click the Close button to close the Fax application.




Developing Applications Using JCA
Developing Applications Using JCA
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 43

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net