Adding a data handler to the jar file

When you have completed the code for the new data handler, you must compile the class and add it to a Java archive (jar) file. The file CustDataHandler.jar is provided to contain custom data handlers. This jar file is located in the DataHandlers subdirectory of the product directory. To locate a data-handler class, the createHandler() method searches this jar file after it searches the CwDataHandler.jar file that contains delivered data handlers.

Note:
To be able to compile Java code, you must have the Java Development Kit (JDK) installed on your machine. For the required version of the JDK and how to install it, refer to your product installation information.

To add a custom data handler to CustDataHandler.jar:

  1. Edit the data-handler compilation script to add the names of the Java source files.

    This data-handler compilation script resides in the following subdirectory of the product directory:

    DevelopmentKits\edk\DataHandler
     
    
    Windows

    On a Windows system, the data-handler compilation script is called make_datahandler.bat. Add the names of the Java source files to the line:

    set SOURCE_FILES_DH=
     
    
    UNIX

    On a UNIX system, the data-handler compilation script is called make_datahandler. Add the names of the Java source files to the line:

    SOURCE_FILES_DH=
     
    
  2. Run the data handler compilation script to compile the Java files into a .class file.
  3. Add the new class to the CustDataHandler.jar file using the following command:
    jar -vf CustDataHandler.jar input_files
     
    

    where input_files is a list of the class files to add.

Copyright IBM Corp. 1997, 2003