logoTop pad
Table of Contents
Creating a new project
Creating a new MIDlet
Packaging for deployment
For EclipseME developers

Eclipse Ready Logo
SourceForge.net Logo

Creating a new J2ME MIDlet Project

This document illustrates how to create a new J2ME MIDlet Project using EclipseME.

  1. Creating a Project From Scratch
  2. Converting an existing project to an EclipseME project
  3. Application Descriptor (JAD) Editor

Creating a project from scratch

In order to create a new EclipseME project, use the New Project Wizard and select J2ME Midlet Suite from within the J2ME item.


The first wizard pane is standard for almost all Eclipse projects. Here, you provide the name of the project, and the location for the project contents. For more information on preprocessing, refer to the preprocessing documentation.


In the second pane, you choose which of the available device definitions you will use for compiling the project and for running and debugging. If necessary, you can change this setting later using the Project Properties. In addition, you may alter the default location for the project's JAD file on this page. The JAD file specified in this field must be created relative to the project's root folder. You may later change the JAD file later using a rename or move refactoring within the Package Explorer.


The final pane provides you with the opportunity to adjust source settings, related projects and libraries, etc. These are standard Eclipse settings. If your project requires an external library (e.g. kXML, etc.), add the JAR file(s) to the list on the "Libraries" tab. EclipseME will automatically manage these JAR files along with your compiled class files.


Once you have completed the above steps, you will have a project that looks like this in your workspace:


Converting an existing project to an EclipseME project

If you have an existing Java project that you want to convert into an EclipseME project, you can do this by selecting Convert to J2ME Midlet Suite from the project pop-up menu.


When you do this, the EclipseME plug-in will automatically prompt you for the appropriate device definition, and will then make the required changes to your project.

If a J2SE project is converted to an EclipseME project, the J2SE libraries need to be removed from the build path. If EclipseME can identify these libraries, it will remove them automatically. If EclipseME does not remove the J2SE libraries, you will need to do this yourself.

EclipseME also handles adding the appropriate J2ME libraries to your project automatically. The specific libraries added are based on the selected device definition. If you were using Eclipse to do J2ME programming prior to converting your project to use EclipseME, your project may still have the J2ME libraries in the build path. If so, you need to remove them. Failure to do this may cause problems, since EclipseME may misinterpret these libraries as additional classes that need to be bundled into your JAR file.

Application Descriptor (JAD) Editor

After creating a new MIDlet Suite Project you may find that you need to alter the suite's properties. MIDlet Suite properties are controlled by the editing the Java Application Descriptor.

Copyright © 2005, http://www.eclipseme.org. All rights reserved.