Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Compile a MIDlet into a COD file

by Retired ‎02-16-2010 09:36 AM - edited ‎02-18-2010 12:21 PM (4,048 Views)


This article applies to the following:

  • BlackBerry® wireless devices based on Java™
  • BlackBerry Java Development Environment (JDE)

  • Procedure

    The BlackBerry JDE converts an existing MIDlet (JAD and JAR file) into a COD file to be used on a BlackBerry device. Complete the following steps:

    1. Create a directory on your hard disk drive and copy the MIDlet JAD and JAR files to this location.
    2. In the BlackBerry JDE, select File > New Workspace.
    3. Change the location to the folder created in step 1, type a name for the new workspace, and click OK.
    4. Once the workspace is loaded, right-click Create new project in [NameofWorkspace].jdw. Place the project that will be created in the same location as the folder in step 1. Type a name for the project and click OK.
    5. Once the project is displayed, right-click Add File to Project.
    6. From the Add Files to [Name of Project] screen, in the Files of Type drop-down list, select All Files.
    7. Change to the folder created in step 1, select both the JAD and JAR files from the MIDlet, and click Open.
    8. Both the JAD and JAR files appear under the project name within the tree.
    9. Right-click the project name and select Properties.
    10. On the Application tab, from the Project Type drop-down menu, select MIDlet.
    11. Under the Name of main MIDlet class title, type the main MIDlet class and click OK.
    12. The fully qualified package and class name are required here.
    13. From the main menu, select File > Build (or press F7) to build the MIDlet.
    14. The compiled COD file will now reside in the directory created in step 1.
Users Online
Currently online: 9 members 766 guests
Please welcome our newest community members: