Me n My Programming

If Only I Have TIme

Adding JDBC library as Eclipse PDT dependency

I was developing an Eclipse plug-in that pull data from MySQL database when I encounter a problem with the database connection when trying to test the plug-in using the Debug Mode. Apparently, the JDBC MySQL driver was not deploy in the runtime-workspace. I would always get an error failure connecting to the database and could not find the com.mysql.jdbc driver. It took three days for me to find the relevant solution. Most of the solution provided refers to exporting the driver in the web based development.

I found this website that mention regarding creating a fragment plug-in consists on the JDBC MySQL driver. I tried to follow the instruction and create the fragment. Then, I add the dependences to the plugin. Go to plugin.xml and select the Dependencies tab. Choose Required Plug-ins section. Add the plugin by searching the plug-in name, for example com.mysql.jdbc.

Restart the workspace and run the code again. Your plug-in should now be able to connect to the database.


One comment on “Adding JDBC library as Eclipse PDT dependency

  1. Hello there! Your site is loading lagging , that took like a minute or two to finally
    load up, I actually have no idea if it is entirely me or your blog however
    facebook worked acceptable for me. However , thanks for creating terrific article.
    Perhaps this has become useful to lots of individuals who came here.

    This is definitely great everything that you actually have done and would like to see
    a lot more interesting posts from your website. I ‘ve got your site saved
    to bookmarks to check blog you publish.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


This entry was posted on March 25, 2014 by in Uncategorized and tagged , , , , .
%d bloggers like this: