Where do I download JDBC drivers for DB2 that are compatible with JDK 1.5?
Solution 1
I know its late but i recently ran into this situation. After wasting entire day I finally found the solution. I am suprised that I got this info on oracle's website whereas this seems nowhere to be found on IBM's website.
If you want to use JDBC drivers for DB2 that are compatible with JDK 1.5 or 1.4 , you need to use the jar db2jcc.jar
, which is available in SQLLIB/java/
folder of your db2 installation.
Solution 2
official Link of DB 2 JDBC Driver from IBM
Solution 3
Right here: http://jt400.sourceforge.net/
This is what I use for that exact purpose.
EDIT: Usage Examples (minus exceptions):
// Driver initialization
AS400JDBCDriver driver = new com.ibm.as400.access.AS400JDBCDriver();
DriverManager.registerDriver(driver);
// JDBC Connection URL
String url = "jdbc:as400://10.10.10.10" + ";promt=false" // disable GUI prompting by jt400 library
// Get a Connection object (this is used to create statements, etc)
Connection conn = DriverManager.getConnection(url, UserString, PassString);
Hope that helps!
Adam Paynter
I was born in Prince Edward Island, Canada and have been experimenting with programming since grade five. In 2007, I graduated with first class honors from the Bachelor of Computer Science program at the University of New Brunswick, Canada. I currently live in Plano, Texas with my wife and two daughters. I work as a software developer for Capital One. I still pursue a handful of personal projects during lunch hours and weekends.
Updated on January 27, 2020Comments
-
Adam Paynter about 4 years
Where do I download JDBC drivers for DB2 that are compatible with JDK 1.5? They seem to be very elusive and I hit many dead-ends at IBM's website. I managed to find versions of the driver bundled with some tools such as IBM Data Studio. Unfortunately, these versions either target a JVM too modern (JDK 1.6, leading to class version errors) or too ancient (JDK 1.2, leading to known bugs when run on JDK 1.5).
-
Adam Paynter over 12 yearsDo you have any examples of how I use that driver to connect? It doesn't seem to have the traditional
com.ibm.db2.jdbc.app.DB2Driver
driver. -
user250343 about 7 yearsEasy check: On a command prompt with Java 1.5 in the path, execute java -cp db2jcc.jar com.ibm.db2.jcc.DB2Jcc -version. I found that 3.69.66 is still compatible with 1.5, but 4.19.66, db2jcc4.jar is not.
-
prayagupa about 7 yearsYep, it was in installation of db2.
/opt/IBM/db2/V10.1/java
for mac