-
If necessary, download and install HyperSQL for Windows. Please ensure that HSQLDB is properly configured and that you can start it normally.
Note that we have placed the software in C:\hsqldb and we'll use that folder throughout this tutorial.
-
Formulate the command line you use to launch HSQLDB.
The User Guide notes the preferred format and we will use that method for this tutorial:
C:\ProgramData\Oracle\Java\javapath\java.exe -cp C:\hsqldb\lib\hsqldb.jar org.hsqldb.server.Server --database.0 file:mydb --dbname.0 xdb
-
Download and install AlwaysUp, if necessary.
-
Start AlwaysUp.
-
Select Application > Add to open the Add Application window:
-
On the General tab:
-
In the Application field, enter the full path to the Java executable file. It will most likely be available in this convenient location:
C:\ProgramData\Oracle\Java\javapath\java.exe
-
In the Arguments field, enter all the parameters from the command line you use to launch HyperSQL (see step 2). Please be sure to specify the full path to the HSQLDB JAR file.
-
In the Start in directory field, enter the full path to your HSQLDB bin folder (C:\hsqldb\bin for us).
-
In the Name field, enter the name that you will call the application in AlwaysUp.
We suggest HyperSQL but you can specify almost anything you like.
-
On the Logon tab:
-
Enter the user name and password of the Windows account you are logged into when you start HyperSQL. HSQLDB should run in this account to find its Java settings (environment variables, etc).
-
If you wish to hide the DOS/command window that comes up when you run HyperSQL (recommended),
check the When a user logs on, don't show the application's windows and tray icons (if any) box at the bottom.
Hiding the command window will prevent the Interactive Services Detection alert
from constantly coming up as HSQLDB runs in the background "Session 0".
-
Click over to the Startup tab and check the Ensure that the Windows Networking components have started box.
This informs AlwaysUp that HSQLDB needs the TCP/IP networking stack to operate.
-
Move to the Extras tab. If you wish to capture the text normally displayed on the command window created by Java (recommended, as you will no longer see the console when it's running in the background as a service),
check the Capture output to this log file box and specify the full path to a file. We have specified C:\hsqldb\hsqldb-log.txt.
-
Click the Save button. In a couple of seconds, an application called HyperSQL will show up in the AlwaysUp window.
It is not yet running though.
-
To fire up your database, choose Application > Start "HyperSQL". The State column should transition to Running after a few seconds and HSQLDB should be available to all your applications.
Click the green circle to see some details of the Java process running HSQLDB:
-
That's it! Next time your computer boots, your HyperSQL database will start up automatically, before anyone logs on.
We encourage you to edit HyperSQL in AlwaysUp and check out the many other settings that may be appropriate for your environment.
For example, setup email notifications, improve performance by boosting the priority of your java process, or periodically restart the DB to cure memory leaks.