• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java application and its database into single installer file.

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic