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

Java Desktop Applications

Mansoor Khan
Greenhorn

Joined: Apr 14, 2008
Posts: 17
hey folks, for some time now I've been planning to create a java desktop application and I've been quite successful too. There are two things bugging me at the moment.
First, how can I associate a Database with my application so that it can run independently and store the data entered on the hard disk.
How can I use the , if I can use that, in my stand-alone application.
The second being how to create an (executable) file of my application, just like its done in Visual Basic. I want my Java desktop application to launch at just one click.
These are my problems for which I'm getting solutions from nowhere. Please help me out guys.
Hope to get a reply from you people soon.


kingmansoor
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42601
    
  65
Welcome to JavaRanch.

EXE files imply native code, which Java doesn't store permanently. But you can create double-clickable applications by using jar files: Packaging Programs in JAR Files, in particular the section titled "Setting an Application's Entry Point".

As to JDBC, you'd want to use a database that doesn't need to be installed, like an all-Java DB. HSQLDB is one such DB. You'll want to run it in "In-Process (Standalone) Mode"; check its documentation for more information on that.

You can start learning about JDBC in the Java Tutorial. JDBC example code can also be found here.


Ping & DNS - my free Android networking tools app
Mansoor Khan
Greenhorn

Joined: Apr 14, 2008
Posts: 17
Thanks dude....guess nw I can work it out
RaviNada Kiran
Ranch Hand

Joined: Jan 30, 2009
Posts: 528
Ulf Dittmer wrote:Welcome to JavaRanch.

As to JDBC, you'd want to use a database that doesn't need to be installed, like an all-Java DB. <a href="http://sourceforge.net/projects/hsqldb" target="_blank" rel="nofollow">HSQLDB</a> is one such DB. You'll want to run it in "In-Process (Standalone) Mode"; check its documentation for more information on that.


Ulf sorry for extending the Thread .But i want to ask this folowing doubt .

As per as DataBase Installation java DB would be fine .Then how about maintaing connections to the DB ?? What i mean is typically in a web Application we will be using a Server Support for DataSource Creation for accessing DataBases access.

If it is product based then how can we achieve all this .Should we install Server with our product ??


If you want something you never had do something which you had never done
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42601
    
  65
Both HSQLDB and Derby/JavaDB have "in-process" modes that don't require a server installation. That's the appropriate way to use them for desktop applications.
RaviNada Kiran
Ranch Hand

Joined: Jan 30, 2009
Posts: 528
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Desktop Applications