File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes java application and its database into single installer file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "java application and its database into single installer file." Watch "java application and its database into single installer file." New topic
Author

java application and its database into single installer file.

Angan Sen
Greenhorn

Joined: Jun 18, 2010
Posts: 10
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

Joined: Oct 27, 2005
Posts: 19543
    
  16

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Angan Sen
Greenhorn

Joined: Jun 18, 2010
Posts: 10
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
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
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.


Ping & DNS - updated with new look and Ping home screen widget
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

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

Joined: Jun 18, 2010
Posts: 10
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java application and its database into single installer file.
 
Similar Threads
Create Swings application as windows setup file
installer for standalone application
DDL & DML executor
database connectivity....
how to make installer