> 10.1.1 | Setup a New Project

> Step 1:
> Create new Java Project:

> - | Select Eclipse menu File → New → Other…

> - | Select J2ME Midlet Suite:

> Figure 22: Create new Eclipse project: Create a J2ME MIDP Midlet Suite

> - | Type in the used name (e.g. Project01) and path for the new project:

> Figure 23: Create new Eclipse project: New J2ME Project

> - | Select e.g. TC65 Release 2 emulator:

> Figure 24: Create new Eclipse project: Midlet Suite Properties

> - | A new Java Project has been created:

> Figure 25: Create new Eclipse project: work area with new created project

> - | Select “Project01” and press <Ctrl+N> and select “J2ME Midlet”:

> Figure 26: Create new Eclipse project: Create a J2ME Midlet

> - | Fill in Midlet parameters (package directory, name of Java source file) and press <Finish>:

> Figure 27: Create new Eclipse project: Create a New J2ME Midlet
> Step 2:
> Modify Java source file “printme.java” template:
> Figure 28: Create new Eclipse project: Edit some Java commands
> This application prints the given line via ASC1 (default setting). Please keep in mind to add “notifyDestroyed();” in destroyApp() method. Please refer to Chapter 6 “MIDlets” for more details about Midlet life cycles.
> Step 3:
> Configure Jad file:

> - | Double click on “Project01.jad” to open the editor and add “deployed\” path in Midlet Jar URL edit line.

> Figure 29: Create new Eclipse project: Edit “deployed” path to Jar file
> Step 4:
> Create Jad and Jar file:

> - | Select “Project01”

> - | Open context menu of “Project01” and select Create Package from item J2ME

> - | Jad and Jar file are be created under the “deployed” directory (default setting of Eclipse)

> Step 5:
> Download Jad and Jar file into the Flash File System of the module and start the Java application:
> Manual download and start of Java application:

> - | Copy Jad and Jar files manually using MES (e.g MES Windows Explorer) into the module

> - | Start the Java application by using at command “AT^SJRA=a:/Project01.jar” (e.g. using ASC1)

> - | The Java “System.out” is printed via ASC1 (default setting) and is displayed on terminal programs (e.g. “Print this line.”).

> Automatic download and start of Java application using IDE:

> - | Open the context menu of “printme.java” and select Emulated J2ME Midlet from item Run As.

> - | The SMTK emulator downloads Jar and Jad file into the Flash File of the module (transmission via MES port that was selected during installation) and automatically starts the Java application.

> - | The Java “System.out” is printed via ASC1 (default setting) and is displayed on terminal programs (e.g. “Print this line.”).

> Further information about importing an existing Java project into Eclipse based on the “Hello World” example is described in Section 11.3.2.7.