File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes JAR file of JDBC connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JAR file of JDBC connection" Watch "JAR file of JDBC connection" New topic

JAR file of JDBC connection

Shiva Mohan
Ranch Hand

Joined: Jan 05, 2006
Posts: 481
I have created an J2SE application which retrieves data's from mysql via JDBC driver. then I export all of the table data's to DAT file. This project works very well in my development PC which has jre and jdk installed. I need to deploy this application to client pc. I have created a jar file with mysql-connector-java-bin.jar added. When i run this on another machine the dat file is empty. I think as I donot have connection with database on another machine. please enlighten me on this topic as I am very new to deployment.

Thanks for your help in advance!!
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33119

That is correct. When you connect to the database, you need to tell the driver where to find the database. One way is to pass the IP in the code.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: JAR file of JDBC connection
It's not a secret anymore!