UltraLite User's Guide
Tutorial: Build an Application Using Java
After you have created a source file Sample.java using the sample code in the previous section, you are ready to build your UltraLite application.
To build your application
Start the Adaptive Server Anywhere personal database server.
By starting the database server, the UltraLite generator has access to your reference database. Start the database server from the Start menu:
Start
Compile your Java source files.
Include the following locations in your classpath:
The current directory (use a dot in your classpath).
The Java runtime classes. For JDK 1.2, include the jre\lib\rt.jar file in your classpath. For JDK 1.1, include the classes.zip file from your Java installation.
The UltraLite runtime classes. These classes are in the following location
%ASANY8%\UltraLite\java\lib\ulrt.jar
where %ASANY8% represents your SQL Anywhere directory.
Use the javac function of the Java development kit as follows:
javac *.java
You are now ready to run your application.
To run your application
Go to a command prompt in the Javatutorial directory.
Include the same classes in the classpath as in the earlier step.
Enter the following command to run the application
java Sample
The list of two items is written out to the screen, and the application terminates.
You have now built and run your first UltraLite Java application. The next step is to add synchronization to the application.