Am using neatbeans 6.8 to develop java application,am able to package and deploy java programs and run them on my computer but when i package and deploy a java program with database it fail to connect with the 'com.mysql.jdbc.driver'.i know someone out there can just post on how to do it and am sure me +others will appreciate your contribution.thanks in advance.

Make sure you are using the correct version of the sql connector, Connector/J 5.1.18 is the latest:

http://www.mysql.com/downloads/connector/j/

Check whether you connection is correct, your path, username and password are correct.

Instructions are provided below:

http://www.mkyong.com/jdbc/how-to-connect-to-mysql-with-jdbc-driver-java/

I don't use Netbeans, I would package it in command line so see if that helps.

http://docs.oracle.com/javase/tutorial/deployment/jar/build.html
http://www.skylit.com/javamethods/faqs/createjar.html

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.