• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Embed mysql database?

 
Junaid Ullah Nadeem
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have developed inventory system for my final project .. I have no idea how to make setup file .. i know how to make exe of jar but how to embed database ...
 
K. Tsang
Bartender
Posts: 3583
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First you need to download the MySQL JDBC driver and add this to your project.
 
Junaid Ullah Nadeem
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have developed the project but i want to make it portable ....

i.e making .exe and setup files the problem is that how i can add database files and mysql to run on other system...

how is it possible..???
 
K. Tsang
Bartender
Posts: 3583
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Executable java programs are called jar files with a main method or entry point.

You can always include the mysql jdbc driver inside the jar file. But then in your program you will need to get the jdbc classes from inside the jar rather than outside.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I interpret the question differently than K. Tsang - it sounds to me like you want to run MySQL on the client machine; is that correct? If so, I strongly advise not to try it - many, many problems lie in that path. If your app needs an embedded DB, use Derby or HsqlDB.
 
Junaid Ullah Nadeem
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:I interpret the question differently than K. Tsang - it sounds to me like you want to run MySQL on the client machine; is that correct? If so, I strongly advise not to try it - many, many problems lie in that path. If your app needs an embedded DB, use Derby or HsqlDB.


thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic