HomeStreek ResourcesClient AppsDeveloper ResourcesTalksHowTo Docs
 

Setting up IBM DB2 Connect with JDBC.

Audience

People who need to use IBM DB2 Connect with JDBC

Purpose

To connect to a DB2 Connect server which subsequently connects to the DB2 Database using JDBC.

Prerequisites

Setting Your Class Path

The following files need to be in your classpath

(This section assumes your db2 instance is /home/db2inst1) and you have set your environment variables appropriately either locally or in eclipse.

  • /home/db2inst1/sqllib/java/db2java.zip
  • /home/db2inst1/sqllib/java/db2jcc.jar
  • /home/db2inst1/sqllib/java/db2jcc_javax.jar
  • /home/db2inst1/sqllib/java/db2jcc_license_cu.jar
  • $ist-jxde/lib/db2jcc_license_cisuz.jar (wherever ist-jxde is checked out)

Compile and Run!

  • Compile: javac className.java
  • Run: java className