Native UltraLite for Java User's Guide
Tutorial: The CustDB Sample Application
The sample comes with a build.bat script to build the CustDB sample from the source java files. A clean.bat script is provide for removing all results of the build.
To build the sample
Locate the sample.
At a command prompt, change directory to the Samples\NativeUltraLiteForJava\CustDB subdirectory of your SQL Anywhere installation. You should leave this command prompt open for the entire tutorial.
Set environment variables.
Ensure the environment variables ASANY9 and JAVA_HOME are properly defined.
ASANY9 is set by the Setup program to your SQL Anywhere installation directory.
Set the JAVA_HOME environment variable to a JDK on your machine. JDK 1.1.8 is recommended, as it is compatible with the Jeode VM used for deployment.
For example, if the JDK is version 1.1.8 in c:\jdk1.1.8 type the following command:
set JAVA_HOME=c:\jdk1.1.8
Build the application:
At the command prompt type build.bat
.
The batch file carries out the following operations:
Compiles the CustDB sample code.
The compiled classes are stored under the builddir subdirectory.
Puts the compiled classes into a JAR file.
The JAR file is stored in the sample directory, where the build.bat file is located.
Creats a database schema file.
The schema file is created from the Adaptive Server Anywhere UltraLite 9.0 Sample database, which holds the CustDB database. The batch file runs the ulinit command-line tool to generate a schema from that database.
For more information on the ulinit tool, see The UltraLite initialization utility.