Contents Index Building the UltraLite Java sample Connecting to and configuring your UltraLite database

UltraLite Static Java User's Guide
  Data Access Using Pure Java
    The UltraLite Java sample application

Running the UltraLite Java sample


You can run the sample application as a Java application or as an applet. In either case, you need to prepare to run the sample by starting the MobiLink synchronization server running on the same machine that the application is running on.

To prepare to run the sample

To run the sample as an application

  1. Open a command prompt in the Samples\UltraLite\CustDB\java\java13 directory (or the java11 directory if you are using Java 1).

  2. Run the sample:

    The application starts and the Enter ID dialog is displayed.

  3. Enter the employee ID.

    Enter an employee ID of 50, and click OK.

    The UltraLite Customer Demonstration window is displayed. If you have run the sample as either an application or applet before, there is data in the database.

  4. If there is no data in the database, synchronize.

    From the Actions menu, choose Synchronize. The application synchronizes, and the window displays an order.

You can now carry out operations on the data in the database.

For more information on the sample database and the UltraLite features it demonstrates, see Tutorial: A Sample UltraLite Application.

To run the sample as an applet using appletviewer

  1. Start a Web server and ensure that the appropriate subdirectory is configured as the default directory for the server, or as one of the virtual directories.

  2. Open a command prompt in the UltraLite\samples\CustDB\java\java13 directory, or java11 if you are using Java 1.

  3. Enter the following command:

    avapplet
  4. Enter the employee ID.

    Enter an employee ID of 50, and click OK.

    The UltraLite Customer Demonstration window is displayed. The first time you run the sample, there is no data in the database. If you have run the sample as either an application or applet before, there is data in the database.

  5. Synchronize the application:

    From the Actions menu, choose Synchronize. The application synchronizes, and the window displays an order.

    You can now carry out operations on the data in the database.

To run the sample as an applet using A Web browser

  1. Start a Web server and ensure that the appropriate subdirectory is configured as the default directory for the server, or as one of the virtual directories.

  2. Start a Web browser and enter the URL for the Samples\UltraLite\CustDB\java\custdb.htm file into the browser.

  3. Enter the employee ID.

    Enter an employee ID of 50, and click OK.

    The UltraLite Customer Demonstration window is displayed. The first time you run the sample, there is no data in the database. If you have run the sample as either an application or applet before, there is data in the database.

  4. Synchronize the application:

    From the Actions menu, choose Synchronize. The application synchronizes, and the window displays an order.

For more information on the sample database and the UltraLite features it demonstrates, see Tutorial: A Sample UltraLite Application.

Resetting the sample 

You can delete all compiled files, the sample database, and the generated code by running the clean.bat file.


Contents Index Building the UltraLite Java sample Connecting to and configuring your UltraLite database