aspose file tools
The moose likes Swing / AWT / SWT and the fly likes Connect Automatically to Database on program start up Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Connect Automatically to Database on program start up" Watch "Connect Automatically to Database on program start up" New topic
Author

Connect Automatically to Database on program start up

Sammy Bill
Ranch Hand

Joined: Dec 29, 2008
Posts: 96
Hello,

I have an application that connect to HSQLDB. What should i do in order to have HSLDB load on program start up automatically without having to run the server manually?

Thanks
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26218
    
  66

What kind of application? Web app, standalone program, swing interface? How do you define starting up? Does something happen?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Sammy Bill
Ranch Hand

Joined: Dec 29, 2008
Posts: 96
Jeanne Boyarsky wrote:What kind of application? Web app, standalone program, swing interface? How do you define starting up? Does something happen?


it is a swing application. for example, I dont have to go and run the hsqldb server manually. When i run the application I want the server to run automatically.

one more replated question. If i compiled my application into an exe file and distribute it. how would it run the DB server and create the tables the first time a user run the executable file?

Thanks
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26218
    
  66

Oussama M Billah wrote:
Jeanne Boyarsky wrote:What kind of application? Web app, standalone program, swing interface? How do you define starting up? Does something happen?


it is a swing application. for example, I dont have to go and run the hsqldb server manually. When i run the application I want the server to run automatically.

That actually makes it a Swing question more than a JDBC one. I'm going to move this to our GUI forum so someone who knows more about Swing startup can answer it.
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

Actually, this is more of a question about HSQLDB. This link tells you how to execute HSQLDB in an in-process mode which is what you want.

As to your question about turning your swing app into an EXE, there's really no need to do this but if you must it will depend on the tool you use to accomplish this. So I'm afraid I can't answer that question.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connect Automatically to Database on program start up
 
Similar Threads
command line parameter
Running java applications in virtual machine without a terminal
Failed to connect to the server in Applet, even..
automatic startup of PPPoE
running batch files/scripts from java