Open topic with navigation
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
-
Download Samples.zip.
-
Download the ArcWeb
J2ME Mobile Toolkit.
- Unzip Samples.zip.
- Open NetBeans.
- Choose File > New Project.
- Select Mobile from the list of Categories.
- Select Mobile project from Existing MIDP Sources
from the list of Projects. Click Next.
- Point the Sources Location to the \src directory
of the extracted folder from Step 3.
- Point the JAD/Manifest Location to the .jad file
located inside the \bin directory of the extracted folder from Step 3.
Click Next.
- Specify a Name and Location for the project settings
to your directory preference. Click Next.
- Choose CLDC-1.0 and MIDP-2.0 and click Finish.
- In NetBeans, right-click the project and choose
Properties.
- Under Build Section, click Library and Resources.
- Click Add Jar/Zip and point to the mkit-1.0_3.jar
file downloaded in Step 2 and click OK.
- Right-click the project and choose Properties.
- Click Running, select Execute through OTA (Over
the Air Provisioning), and click OK.
- Double-click the *Midlet.java files to view the
Mobile Visual designer in action.
- Click the source tab to view the source code for
the midlets.
- 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.
public String user = ""; //ArcWeb username
public String pwd = ""; //ArcWeb
Password
NOTE: These variables are not used in MapCanvas.java
or RecordManagerMidlet.java.
- On the Projects tab, right-click Project, and
click Build Project.
- 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