Monday, November 14, 2011


If you get below mentioned error

Exception in thread "main" java.lang.ClassNotFoundException:
        at$ Source)
        at Method)
        at Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)

Possible reason could be you forgot to add db2java.jar file in classpath. Please cross check if the jar file db2java.jar is added in class path.

Also make sure that driver name is in proper case, as Driver name case sensitive. i.e. (Note that COM is in upper case)

To download Jar file : Click here


  1. Nice Post! It is really interesting to read from the beginning & I would like to share your blog to my circles, keep your blog as updated.
    JAVA Training in Chennai|Best JAVA Training institute in Chennai|Java Courses in Chennai