You can use DB2 Java Database Connectivity (JDBC) support to run the following types of Java programs:
Java can also be used on the server to write user-defined functions, stored procedures, and table functions.
For further information on developing Java applications that access DB2 databases refer to the Web page located at http://www.software.ibm.com/data/db2/java/ and the Road Map to DB2 Programming.
The following environment variables must be set to run Java programs:
Start your application from the desktop or command line, like any other application. The DB2 JDBC driver handles the JDBC API calls from your application and uses the DB2 Client Application Enabler to communicate the requests to the server and receive the results.
Because Java applets are delivered over the Web, you treat them a bit differently than Java applications. You must install DB2 (server or client) on the same machine as your Web server, then install the Java Development Kit (JDK) Version 1.1 from Sun Microsystems on the server as well (refer to http://www.software.ibm.com/data/db2/java for details).
To run your applet, you need only a Java-enabled Web browser on the client machine. When you load your HTML page, the applet tag downloads the Java applet to your machine, which then downloads the Java class files, including the COM.ibm.db2.java.sql and COM.ibm.db2.jdbc.net classes and DB2's JDBC driver. When your applet calls the JDBC API to connect to DB2, the JDBC driver establishes separate communications with the DB2 database through the JDBC applet server residing on the DB2 server.
To run your applets, do the following:
where portno is the number of the unused TCP/IP port that you specified in the DB2Applt.java file.
[ DB2 List of Books | Search the DB2 Books ]