Application Building Guide

General Points for DB2 Java Applets

  1. For a larger JDBC or SQLJ applet that consists of several Java classes, you may choose to package all its classes in a single JAR file. For an SQLJ applet, you would also have to package its serialized profiles along with its classes. If you choose to do this, add your JAR file into the archive parameter in the "applet" tag. For details, see the JDK Version 1.1 documentation.

    For SQLJ applets: some browsers do not yet have support for loading a serialized object from a resource file associated with the applet. For example, you will get the following error message when trying to load the applet Applt in those browsers:

            
       java.lang.ClassNotFoundException: Applt_SJProfile0                       
    

    As a work-around, there is a utility which converts a serialized profile into a profile stored in Java class format. The utility is a Java class called sqlj.runtime.profile.util.SerProfileToClass. It takes a serialized profile resource file as input and produces a Java class containing the profile as output. Your profile can be converted using one of the following commands:

       profconv Applt_SJProfile0.ser                                            
    

    or

                                                                               
       java sqlj.runtime.profile.util.SerProfileToClass Applt_SJProfile0.ser    
    

    The class Applt_SJProfile0.class is created as a result. Replace all profiles in .ser format used by the applet with profiles in .class format, and the problem should go away.

  2. You may wish to place the file db2java.zip (and for SQLJ applets, also the file runtime.zip) into a directory that is shared by several applets that may be loaded from your Web site. These files are in the %DB2PATH%\java directory on OS/2 and Windows 32-bit operating systems, and in the sqllib/java directory on UNIX. You may need to add a codebase parameter into the "applet" tag in the HTML file to identify the directory. For details, see the JDK Version 1.1 documentation.
  3. Since DB2 Version 5.2, signal handling has been added to the JDBC applet server (listener), db2jd, to make it more robust. As a result, one cannot use the CTRL-C command to kill db2jd. Therefore, the only way to terminate the listener is to kill the process.
  4. For information on running DB2 Java applets on a webserver, specifically the Domino Go Webserver, see:
       
    
    http://www.ibm.com/software/data/db2/db2lotus/gojava.htm
    


[ Top of Page | Previous Page | Next Page ]