This information will enable you to edit, compile, and
run the example IBM® Toolbox for Java™ 2
Micro Edition program.
You can also use this information as a general guide for
creating, testing, and running the ToolboxME working examples and
your own ToolboxME applications.
The example program uses the
K Virtual Machine (KVM) and allows the user to perform any JDBC query.
The user can then perform JDBC actions (next, previous, close, commit,
and rollback) against the result of the query.
Before you begin
creating any of the ToolboxME examples, make sure that your environment
meets the ToolboxME requirements.
Creating the ToolboxME example
To
create the ToolboxME example program for your Tier0 device, complete
the following steps:
- Copy
the Java code for the ToolboxME example,
called JdbcDemo.java.
- In your chosen text or Java editor,
change the portions of the code as indicated in the program comments
and save the file with the name JdbcDemo.java.
Note: Consider
using a wireless application development tool, which makes it easier
to complete the remaining steps. Some wireless application development
tools may compile, preverify, and build your program in a single step,
then automatically run it in an emulator.
- Compile JdbcDemo.java, making sure you point to the JAR file that contains the KVM classes.
- Preverify the executable file, either by using your wireless
application development tool or by using the Java preverify
command.
- Build the appropriate type of executable file for the operating
system of your Tier0 device. For example, for the Palm OS, you build
a file called JdbcDemo.prc.
- Test the program. If you have installed an emulator, you
can test the program and see what it will look like by running it
in the emulator.
Note: If you test the program on your
wireless device and you do not use a wireless application development
tool, make sure that you preinstall your chosen Java virtual
machine or MIDP on the device.
See ToolboxME
concepts for related information about concepts, wireless application
development tools, and emulators.
Running
the ToolboxME example
To run the ToolboxME example program
on your Tier0 device, complete the following tasks:
- Load the executable file to the device, using the instructions
provided by your Tier0 device manufacturer.
- Start the MEServer
- Run the JdbcDemo program on your Tier0 device by clicking the
JdbcDemo icon.