Using JDBC for DB2 connectivity

As part of IBM’s “Java Everywhere” strategy, IBM has provided the OS/390 Java programmer with two access mechanisms to access DB2 data. In this article I’ll explain how to make DB2 connection using JDBC. First of all you need to download driver. You can download respective db2jcc or db2jcc4 jar file from https://www.ibm.com/support/pages/db2-jdbc-driver-versions-and-downloads or use maven: Driver name is depends on the driver we are using.