GeeCON Prague 2014*
The moose likes JDBC 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
Bookmark "JAR file of JDBC connection" Watch "JAR file of JDBC connection" New topic
Author

JAR file of JDBC connection

Shiva Mohan
Ranch Hand

Joined: Jan 05, 2006
Posts: 477
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
Marshal

Joined: May 26, 2003
Posts: 30598
    
154

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
GeeCON Prague 2014
 
subject: JAR file of JDBC connection