Creating new MTJ projects

There are two wizards for creating MTJ projects: MTJ Midlet Project and MTJ Project wizards.

The MTJ Midlet Project creates resources that are required to define a MIDlet. The MTJ Project must be used for any other Java ME profile choice.

The MTJ Projects are extensions of an Eclipse Java project. Additional resources include the mtj.project file, which is a control file that points to the SDK libraries. That file must not be edited.

The MTJ Midlet Project also includes a xxx.jad file (xxx is the project name). This file is the Java Application Descriptor file defined in the MIDP specification.

Note: When creating a MTJ project, you also define the mobile runtime for the project. To do this, you need to have the desired mobile SDK stored on your computer.

To create a new MTJ project

  1. In the menu bar, select File -> New -> Project.
    New Project wizard opens with The Select a wizard window.


     

  2. Expand MTJ and:

OR

  1. In the Project name field, enter a name for the project.

  2. In the Project contents field, if you do no want to create the project in the default directory, uncheck the Use default box and browse for a new location.

  3. Click Next.
    The MTJ JavaME Library Addition window opens.### OPEN ISSUE <15>###


     

  4. To select the Java runtime for the platform, in the Select Runtime Platform field:

OR

  1. Click Next.
    The Java Settings window opens.


     

  2. To define the Java settings:

    1. To define the source folders on build path, select the Source tab, and click Add Folder. In the New Source Folder window, add a source new folder and click OK.
    2. To add required projects on the build path, select the Projects tab, and click Add. In the Required Project Selection window, select the projects to be added and click OK.

Note: Only the projects from your current workspace are listed.

  1. In the Configure Midlet Suite window, define the following properties for the JAD file:

Note:You can edit the JAD file at a later point in more detail, using the Application Descriptor Editor.

  1. Click Finish.
    You have now created a MTJ project. The project folder is displayed in the Package Explorer view.

  2. In Package Explorer view, expand the project folder.
    The project folder displays the contents of the project. These include the chosen runtime library, the optional separate source folder, the project folder and the JAD file.

Tip: You can import existing Java ME projects into the MTJ workspace, and convert them into MTJ projects by right-clicking the desired project in the Package Explorer and selecting Convert to MTJ Project.### OPEN ISSUE <15>###


Mobile Tools for Java Platform
Mobile SDKs
Mobile runtimes


Managing mobile SDKs
Creating your first MIDlet
Editing the JAD file


Wizards
JAD file