Exit Print View

Java Platform Micro Edition Software Development Kit Version 3.0

Get PDF Book Print View

Document Information

Getting Started

Java ME Platform SDK Features

Using Sample Projects

Creating and Editing Projects

About Projects

CLDC Projects

CDC Projects

Creating a CLDC Project

Choose Project

Name and Location

Platform Selection

Specify WTK Project

Creating a CDC Project

Choose Project (CDC)

Platform Selection (CDC)

Specify CDC Toolkit Project

Working With Projects

Viewing Project Files

Creating a New MIDlet

Importing MIDP Projects

Importing CDC Projects

Adding Files to a Project

Find in Files

Viewing and Editing Project Properties

Running Projects in the Emulator

Searching the WURFL Device Database

Finding Files in the Multiple User Environment

Profiling Applications

Monitoring Network Traffic

Lightweight UI Toolkit

Security and MIDlet Signing

BD-J Support

CLDC Emulation on a Windows Mobile Device

Installing CLDC Emulation on a Windows Mobile Emulator

On-device Debugging

Command Line Reference

Logs

JSR Support

JSR 75: PDA Optional Packages

JSR 82: Bluetooth and OBEX Support

JSR 135: Mobile Media API Support

JSR 172: Web Services Support

JSR 177: Smart Card Security (SATSA)

JSR 179: Location API Support

JSRs 184, 226, and 239: Graphics Capabilities

JSR 205: Wireless Messaging API (WMA) Support

JSR 211: Content Handler API (CHAPI)

JSR 238: Mobile Internationalization API (MIA)

JSR 229: Payment API Support

JSR 256: Mobile Sensor API Support

Index

Creating a CDC Project

The SDK provides a wizard for creating new projects quickly and easily. Most project properties can be edited later on. CDC core, FP, and PBP APIs are automatically included in every CDC project.

  1. Select File > New Project.

    The New Project wizard opens.

  2. Follow the prompts in the New Project wizard, consulting help if necessary. See Choose Project (CDC), Name and Location , Platform Selection (CDC), and Specify CDC Toolkit Project.

  3. The Name and Location page has the following fields:

    Project Name. The name you supply is the default name for the Main class, if you use one.

    Project Location. Browse to the project location. The default is /JavaMESDKProjects.

    Project Folder. This value is extrapolated from the Name and Location entries.

  4. Set as Main Project. Check this box to set this project as main. Toolbar actions, such as Build and Run, operate on the main project. The main project is displayed in bold font in the project tree.

  5. Create Main Class. If you want to create a sample Main class in the project, check the box and supply a project name. If the box is not checked, the project will not have a Main class.

  6. Select platform.

    Select the platform, a device, and the profile. Click Finish.

    If an AGUI device is selected, the AGUI API is added to the project.

  7. To run the new project follow the steps in Running a Project, except you can select your new project instead of a sample project.

    When you are finished viewing the application, go to the emulator’s Application menu and select Exit to close the emulator and stop the execution of the project’s build script.


Note - Once the emulator is launched, it runs as an independent process. Pressing the red stop button in the Output window terminates the build script, but it does not close the emulator. Likewise, closing the SDK does not affect the emulator. In the emulator, select Application > Exit to ensure that both the emulator and the project build process close.


To modify the project, right-click on the project node and select Properties.

See the following topics: Viewing General Project Properties, Selecting a Platform, Editing Application Descriptor Properties, Building a Project, and Running a CDC Project