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.
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.
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
Joined: Mar 22, 2005
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.
Joined: Jan 30, 2009
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com