• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java application and its database into single installer file.

 
Angan Sen
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need help, please help me. I am developing a swing based application. in which I want to use postgre/mysql as database, and i want to create single installer file which will install the database and my application as well into any platform/computer.

I will very thankful if some show me a way to do that. step by step approach will be appriciable novice in java. Thanks in advance.
 
Rob Spoor
Sheriff
Pie
Posts: 20545
56
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you want to stick to PostgreSQL or MySQL? There are several database engines, like SQLite and HSQLDB, that only require a driver and a stand-alone file.
 
Angan Sen
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Prime wrote:Why do you want to stick to PostgreSQL or MySQL? There are several database engines, like SQLite and HSQLDB, that only require a driver and a stand-alone file.


I am open to use any database. However I am not familier with those. If I use these databases don't I have to install the database to the machine where my software is running. Please explain me elaborately. It'll be real help if you give me the steps to work with there db apps.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd probably stay away from SQLite (which uses native code) if you expect to distribute the app to unknown client systems. But either HSQLDB or Derby can run in the same JVM as the application, so there's nothing else to install. Their respective web sites have extensive documentation on how that's done, so there's not much point in repeating those steps here.
 
Rob Spoor
Sheriff
Pie
Posts: 20545
56
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:I'd probably stay away from SQLite (which uses native code) if you expect to distribute the app to unknown client systems.

There is also a pure-Java driver available. Still, the others you mentioned (I wasn't sure about Derby a.k.a. SunDB) are also good alternatives.

Angan, in the end, all you'll need to do is add one or more JAR files to your application, and the database file (or create it on the fly on first use). Nothing too hard about that; it all works through JDBC.
 
Angan Sen
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to both of you for your kind help. Your distinct suggestion has lead me to the the solution. The best help a java newbie can get from here is unbelievable. You guys rock with simplicity. Thanks again we Greenhorns hats off to you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic