You are here: Using J2ME Mobile Toolkit > Samples > J2ME samples set up

S A M P L E S

J2ME Wireless Toolkit samples set up

The purpose of these samples is to demonstrate how to develop ArcWeb J2ME Mobile Toolkit applications for ArcWeb Services using the J2ME Wireless Toolkit. A set of seven sample code downloads is available for use with the mobile toolkit.

The ZIP file contains the project files you need to create all the client samples. Each download also includes a set up file with instructions for deploying the samples in a Web application.

These instructions assume you have J2ME SDK and J2ME Wireless Toolkit running on your machine and an active subscription to ArcWeb Services. It also assumes you have a program to unzip the sample code.

For more information on getting started with ArcWeb Services, see Getting started with ArcWeb Services.

How to use

  1. Download Samples.zip.
  2. Unzip Samples.zip to the apps directory of the J2ME Wireless Toolkit, for example, C:\WTK22\apps\.
  3. Set the user and pwd variables in the following *Midlet.java files: DataManagerMidlet.java, GeocodeMapMidlet.java, LocationMidlet.java, MapImageMidlet.java, PoiMidlet.java, and RouteMidlet.java. Each file can be found in the folder of that name in the Samples\src\com\esri\mkit\samples directory created in Step 2.
  4. public String user = ""; //ArcWeb username

    public String pwd = "";  //ArcWeb Password

    NOTE: These variables are not used in MapCanvas.java or RecordManagerMidlet.java.

  5. Download the ArcWeb J2ME Mobile Toolkit and put mkit-1.0_3.jar in the Samples\lib folder, for example, C:\WTK22\apps\Samples\lib\.
  6. Open the K Toolbar that comes with the J2ME Wireless Toolkit.
  7. From the K Toolbar menu, select File > Open Project.
  8. Select Samples.
  9. Select Project > Build.
  10. Select Project > Package > Create Package.
  11. Select Project > Run via OTA. 'Install Application' displays on the emulator screen.
  12. With 'Install Application' selected, click Menu below the menu option on bottom left.
  13. On the menu, select Launch and click the center Select button. A URL to Samples.html appears on the emulator screen.
  14. Click Menu, choose the Go menu, and click Select. Samples.jad displays on the emulator screen.
  15. Click the button below the Install menu. The contents of the JAD file display.
  16. Click the button below Install. An 'Installation successfully completed' message displays and Samples is listed under install Application on the Application screen.
  17. Select Samples, if not already selected, and click the button below the Menu option on the emulator screen.
  18. On the menu, select Launch and click Select to launch the sample application.

Visit the Feedback page to give comments or suggestions about the ArcWeb Developer's Guide.

ArcWeb site | ArcWeb support | support.esri.com

Copyright © ESRI