Java[tm] Smart Ticket Sample Application 2.0 Early Access > Running the Pre-Built Sample Application

Running the Pre-Built Sample Application

These instructions describe how to run the sample application using the J2EE SDK and the J2ME Wireless Toolkit on a single machine. The sample application bundle includes pre-built binaries that you can use to run the sample application. If you make any modifications to the source code, you'll need to follow a different set of instructions on building the application.

  1. Start the Cloudscape database server, which comes with the J2EE SDK.

  2. Start the J2EE Reference Implementation server, which comes with the J2EE SDK.

  3. If you are running the J2EE part of the application for the very first time, follow these steps:

  4. Run the MIDP part of the application using the J2ME Wireless Toolkit (this can also be achieved using the setup script- see below).

    A phone emulator will appear, showing the Java Smart Ticket Sample Application splash screen.

You can now use the application.

Using the Setup Script

Most of step 3 and all of step 4 above can be executed using a setup script in the sample application bundle.

Bring up a shell or command prompt, change the current directory to {smart_ticket.dir}, and type:

setup.sh <argument> (Solaris or Linux)

setup.bat <argument> (Windows)

The following table lists arguments you can use with the setup script in {smart_ticket.dir}, and what using each of these arguments accomplishes.

Arguments for the setup script
Argument Purpose
all Setup the entire application. (This is the default target.) You still must populate the application's database as explained in step 4b above.
deploy Deploys the J2EE server part on the J2EE SDK server. You still must populate the application's database as explained in step 4b above.
emulate Runs the MIDP client part in the emulator.
cleandb Cleans the J2ME Wireless Toolkit RMS data store.
undeploy Undeploys the J2EE server part from the J2EE SDK server.

© 2002, 2003 Sun Microsystems, Inc. All rights reserved.