UltraLite Static Java User's Guide
Data Access Using Pure Java
The UltraLite Java sample application
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
Start the MobiLink synchronization server running on the UltraLite sample database:
From the Start menu, choose Programs
To run the sample as an application
Open a command prompt in the Samples\UltraLite\CustDB\java\java13 directory (or the java11 directory if you are using Java 1).
Run the sample:
Set the JAVA_HOME environment variable. For example:
SET JAVA_HOME=c:\jdk1.3.1
Enter the following command:
run
The application starts and the Enter ID dialog is displayed.
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.
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
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.
Open a command prompt in the UltraLite\samples\CustDB\java\java13 directory, or java11 if you are using Java 1.
Enter the following command:
avapplet
The applet starts and a field to enter an employee ID is displayed.
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.
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
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.
Start a Web browser and enter the URL for the Samples\UltraLite\CustDB\java\custdb.htm file into the browser.
The applet starts and a field to enter an employee ID is displayed.
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.
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.
You can delete all compiled files, the sample database, and the generated code by running the clean.bat file.