I have a problem connecting to IBM (universal) database using JDBC. I wrote the code in Notepad using Java and I loaded drivers of IBM database i.e(driver name and connection URl). When I run the code using general compilation (javac code.java and java code) I am getting an error message "cannot find the driver" but I specified the correct driver name for that. Actually I did this program using Eclipse using the same database with same driver name and all and finally I succeeded, but I cant get this without using an IDE. So please help me how to connect without the IDE and how to run it in a command prompt.
+2
A:
You need to include the necessary JAR files on the classpath when you run your program on the command line.
If you're using IBM's DB2 UDB database, the required driver file is db2jcc.jar
, and I think db2jcc_license_cisuz.jar
and db2jcc_license_cu.jar
are necessary for licensing as well. Search for those files, and include them on the classpath when you run your program from the command line.
Kaleb Brasee
2010-02-19 14:11:59
thanks you very much for u r answer it helped me
2010-02-19 14:36:15