Tuesday, 14 June 2011

DB2 java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver

This problem happens when you don't have the db2jcc.jar and db2jcc_license_cu.jar in your CLASSPATH. Once added, problem will be resolved. How to add them to your CLASSPATH depends on your application and how you execute it. For example, if it is a Java application that you execute from within Rational application developer (for example as a JUnit), or from Eclipse, then you need to add them from “Run Configuration” as clicking “Add JARs” or “Add External JARs”.

RAD Run Configuration

5 comments:

  1. Thank you so much. This post has really helped me. I have been searching for hours. In every site they just say how to install or use. When I check it is already installed. Thanks a lot!

    ReplyDelete
    Replies
    1. Thanks a lottttttttttt..................

      Delete
  2. How do you do this on Linux terminal out of curiousity?

    ReplyDelete
  3. Thank you so much! I have spent hours on this

    ReplyDelete