Generating Java Object API Code

Goal: Generate object API code for the SUP101 mobile application project.

Prerequisites
You must be connected to both the sampledb database and Unwired Server. Code generation fails if the server-side (run-time) enterprise information system (EIS) data sources referenced by the MBOs in the project are not running and available to connect to when you generate object API code.
Task
Tip: If you are performing other tutorials, you can add a new folder to the project in which to generate code for each device platform. You must create the new folder prior to code generation.
  1. Right-click the SUP101 Mobile Application Diagram and select Generate Code.
  2. Select Continue without a configuration, and click Next.
    Note: You can select the code generation configuration if you are using the Advanced developer profile.
  3. Make sure the Customer and Sales_order MBOs are selected, then click Next.
  4. Enter the information for the listed configuration options, and use the default values for the others.
    Option Description
    Language Select Java.
    Platform Select Java ME for BlackBerry.
    Unwired Server Select My Unwired Server.
    (Optional) Clean up destination before code generation Select this option to delete all items in the destination folder before generating the device client files.
    Replication-based Make sure that replication-based synchronization is selected for the application.
    Generate JavaDoc Unselect this option for purposes of this tutorial.
  5. Click Finish.
    Error icons appear next the SUP101 project and the SUP101DB.java file because the SUP101DB.java file calls the net_rim_api.jar, yet it does not appear in the project build path. Because you build the application in the BlackBerry Java Plug-in for Eclipse, you can ignore these errors.
Next
Install the BlackBerry Java Plug-in for Eclipse.