Cannot load driver while using jdbc in eclipse plugin

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nehagp
    New Member
    • May 2007
    • 2

    #1

    Cannot load driver while using jdbc in eclipse plugin

    Hi,

    I am trying to write my first eclipse plugin and am accessing a DB2 db from within the plugin. I added the db2java.zip file in the Libraries for the java build path for this plugin. But when this statement is executed, it gives me a ClassNotFoundEx ception.

    Class.forName(" COM.ibm.db2.jdb c.app.DB2Driver ");

    The code is working just fine when I run it from outside the plugin, it does not give any exception and the DB access is working fine.

    What do I do?
    Neha.
  • nehagp
    New Member
    • May 2007
    • 2

    #2
    I solved the problem.

    Apparently, you have to unzip the db2java folder and add it in the plugin/lib folder and then add the name of the unzipped folder into Runtime > Classpath in the plug in.

    Neha.

    Comment

    Working...