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

S A M P L E S

NetBeans samples set up

The purpose of these samples is to demonstrate how to develop ArcWeb J2ME Mobile Toolkit applications for ArcWeb Services using NetBeans. 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 NetBeans IDE, NetBeans 4.1 Mobility Pack, and J2SE SDK 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. Download the ArcWeb J2ME Mobile Toolkit.
  3. Unzip Samples.zip.
  4. Open NetBeans.
  5. Choose File > New Project.
  6. Select Mobile from the list of Categories.
  7. Select Mobile project from Existing MIDP Sources from the list of Projects. Click Next.
  8. Point the Sources Location to the \src directory of the extracted folder from Step 3.
  9. Point the JAD/Manifest Location to the .jad file located inside the \bin directory of the extracted folder from Step 3. Click Next.
  10. Specify a Name and Location for the project settings to your directory preference. Click Next.
  11. Choose CLDC-1.0 and MIDP-2.0 and click Finish.
  12. In NetBeans, right-click the project and choose Properties.
  13. Under Build Section, click Library and Resources.
  14. Click Add Jar/Zip and point to the mkit-1.0_3.jar file downloaded in Step 2 and click OK.
  15. Right-click the project and choose Properties.
  16. Click Running, select Execute through OTA (Over the Air Provisioning), and click OK.
  17. Double-click the *Midlet.java files to view the Mobile Visual designer in action.
  18. Click the source tab to view the source code for the midlets.
  19. 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.
  20. public String user = ""; //ArcWeb username

    public String pwd = "";  //ArcWeb Password

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

  21. On the Projects tab, right-click Project, and click Build Project.
  22. On the Projects tab, right-click Project, and click Run Project. The sample starts running in the emulator.

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

ArcWeb site | ArcWeb support | support.esri.com

Copyright © ESRI