Java[tm] Smart Ticket Demo 1.1.1 > Running the Sample Application |
These instructions describe how to run the sample application using the J2EE SDK and the J2ME Wireless Toolkit.
If you are running the J2EE and J2ME parts on different machines, refer to "Configuring the Sample Application" before using these instructions.
Start the Cloudscape database server, which comes with the J2EE SDK.
Bring up a command prompt.
Change the current directory to %J2EE_HOME%\bin
(Windows
NT/2000) or $J2EE_HOME/bin
(Linux or Solaris).
Enter the following command:
cloudscape -start
Start the J2EE Reference Implementation server, which comes with the J2EE SDK.
Bring up a command prompt.
Change the current directory to %J2EE_HOME%\bin
(Windows
NT/2000) or $J2EE_HOME/bin
(Linux or Solaris).
Enter the following command:
j2ee -verbose
Deploy the J2EE part of the application using the J2EE RI deployment tool.
Bring up a command prompt.
Change the current directory to %J2EE_HOME%\bin
(Windows
NT/2000) or $J2EE_HOME/bin
(Linux or Solaris).
Enter the following command:
deploytool
From the File menu, select Open....
Using the subsequent file dialog, go to {smarticket.dir}/bin
and open smarticket.ear
.
From the Tools menu, select Deploy....
Click Finish to complete the deployment.
Run the MIDP part of the application using the J2ME Wireless Toolkit.
If you are using Windows:
From the Start menu, select Programs > J2ME Wireless Toolkit 1.0.3 > Run MIDP Application....
Using the subsequent file dialog, go to {smarticket.dir}/bin
and open smarticket.jad
.
If you are using Solaris or Linux:
Bring up a shell prompt.
Change the current directory to {smarticket.dir}/bin
.
Enter the following command:
$J2MEWTK_HOME/bin/emulator -Xdescriptor:smarticket.jad
A phone emulator will appear, showing the Java Smart Ticket Demo splash screen.
If you are running the application for the very first time, follow these additional steps:
Populate the Cloudscape database with the demo's data.
Bring up a shell or command prompt.
Change the current directory to {smarticket.dir}
.
Enter the following command:
populate
This command will execute the SQL commands inside {smarticket.dir}/src/smarticket.sql
.
Fill out the user preferences form to create a new user account.
At the demo splash screen, press the Sign In button, you will see a dialog asking you to create an account.
Fill the user preferences form completely and press Save.
You can now use the application.