Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Connect to database when application run from executable Jar

843859Jun 27 2006 — edited Jun 27 2006
hi,

I've managed to setup the JDBC for mysql in netbeans and have wriiten java code to search and modify the database. What I need is for my code to interact with the mysql database when the project is compressed to an executable Jar and run.

Since Netbeans required me to setup the JDBC will the driver be automatically included when I create the Jar file (using Netbeans clean and build function) or will I have to do something else to get the application to connect to the database?

Is it even possible to get my java code to connect to the database when run from an executable Jar file (with both the mysql database and Jar file stored on the same pc).

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 25 2006
Added on Jun 27 2006
1 comment
426 views