Native UltraLite for Java User's Guide
Tutorial: The CustDB Sample Application
Deployment of the CustDB sample onto a CE/ARM device requires the Jeode Runtime (Java VM).
To deploy the application to a Windows CE device
Start Windows Explorer on your Windows CE device.
Ensure that your device is connected to your desktop computer.
In the ActiveSync window, click Explore. An Explorer window opens.
Create directories to hold the UltraLite runtime and application.
If you have carried out the previous tutorial, some of these directories may already exist.
In the Explorer window, click My Pocket PC. This is the root directory, and has a path of \.
Create a directory named UltraLite.
Open the UltraLite directory and create subdirectories named lib and CustDB. \UltraLite\lib is the location for the UltraLite runtime files, and \UltraLite\CustDB is the location for the application. These directories match the options in the shortcut file provided in the ce subdirectory.
Copy the UltraLite runtime files to the Windows CE device:
If you have carried out the previous tutorial, you may have already carried out this operation. You do not need to repeat the step.
Start a separate Explorer window and navigate to the SQL Anywhere installation directory on your desktop machine.
Drag the following files from the desktop to the device:
Desktop location relative to your SQL Anywhere directory | Windows CE location |
---|---|
UltraLite\NativeUltraLiteForJava\jul9.jar | \UltraLite\lib |
UltraLite\NativeUltraLiteForJava\ce\arm\jul9.dll | \UltraLite\lib |
Copy the application files to the Windows CE device:
In your Explorer window, navigate to the Samples\NativeUltraLiteForJava\CustDB directory.
Drag the following files from the desktop to the device:
Desktop location | Windows CE location |
---|---|
custdb.jar | \UltraLite\CustDB |
ul_custapi.usm | \UltraLite\CustDB |
In this tutorial, do not copy the database file to the Windows CE device.
Copy the shortcut file to the Windows CE device:
Drag the following file from the desktop to the device:
Desktop location relative to your SQL Anywhere directory | Windows CE location |
---|---|
ce\CustDB.lnk | \Windows\Start Menu |
Install the ActiveSync provider.
The ActiveSync provider is required for synchronization.
For instructions, open the SQL Anywhere Studio Online Books and lookup the index entry ActiveSync: installing the MobiLink provider.
Register the application for use with ActiveSync.
When registering CustDB, use the following properties:
Property | Value |
---|---|
Name | JULCustDB |
Class Name | JULCustDB |
File Location | \Windows\evm.exe |
Arguments | -Djeode.evm.console.local.keep=TRUE -Djul.library.dir=\UltraLite\lib -cp \UltraLite\CustDB\custdb.jar;\UltraLite\lib\jul9.jar custdb.Application ACTIVE_SYNC_LAUNCH |
You can run the batch file Samples\NativeUltraLiteForJava\CustDB\ce\as_register.bat to carry out this operation.
SQL Anywhere Studio usersThe setup steps for ActiveSync synchronization are given in the SQL Anywhere Online books under the index entry ActiveSync: deploying UltraLite applications. |
To run the application
Start the MobiLink synchronization server.
If you have SQL Anywhere Studio, use the batch file Samples\NativeUltraLiteForJava\CustDB\ce\startdb.bat.
On the CE device, run the CustDB application from the Start menu.
You should now explore the application.