• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Desktop Applications

 
Mansoor Khan
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mansoor Khan
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks dude....guess nw I can work it out
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ??
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic