user4o01
user4o01

Reputation: 2698

embed mysql database in java application

I make a java application using netbeans that connect to database , but i have a problem , i want to embed mysql database with the executable jar file , so when i take this jar file and run it on any pc that doesn't have mysql server it will run with database , i thought about include the mysql-installer.exe and make a script to install the mysql server , but i can't find how to do that ,also i read about Connector/MXJ does it work if the user run the application and he does not have mysql server , any suggestion or article about this.

Upvotes: 2

Views: 1888

Answers (2)

user684934
user684934

Reputation:

Derby is a pure-java DBMS. You bundle the derby jar with your program, just as you would any other library. This is a much cleaner way of ensuring your user has a db for your program, as you're not adding any dependencies.

Upvotes: 1

hlysig
hlysig

Reputation: 1

Usually distributors don't include standalone databases, such as MySQL or Oracle, with their application. If needed, they provide SQL script to build the database and make the user type in the database host, username and password and make a script to build the database. If you want to "ship" the database with your application then I would consider more lightweight databases such SQLite (singe file database).

Upvotes: 0

Related Questions