Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAR file of JDBC connection

 
Shiva Mohan
Ranch Hand
Posts: 486
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic