Creating a BlackBerry Device Application Project

Create the BlackBerry project and add the generated mobile business object (MBO) Java files, or the Device Application Designer Java and framework files, to the BlackBerry JDE.

Follow these steps whether you are developing the device application directly from code generated from MBOs, or extending an existing Device Application Designer device application, except where noted.
Note: These steps apply only if you are using the BlackBerry JDE to develop the application. If you are using the BlackBerry Eclipse plug-in, configuration is performed automatically by the Device Application Designer when you generate the code.
  1. Launch the BlackBerry JDE and create a new workspace.
  2. Create a BlackBerry project and name it supOptions.
  3. Right-click the project and select Properties.
  4. In the properties dialog, select the Application tab, specify Library for Project type and select Auto-run on startup.
  5. Select the Build tab, and click Add next to “Imported jar files.” Add either:
    • For Device Application Designer – these UltraLiteJ.jar and BOBFramework.jar files to the project:
      • <UnwiredPlatform_InstallDir>\Unwired_WorkSpace\Eclipse\sybase_workspace\mobile\eclipse\plugins\com.sybase.uep.bob.rim<version_time_stamp>\generate\blackberry\UltraLiteJ.jar
      • <UnwiredPlatform_InstallDir>\Unwired_WorkSpace\Eclipse\sybase_workspace\mobile\eclipse\plugins\com.sybase.uep.bob.rim<version_time_stamp>\generate\blackberry\build-4.<version>\BOBFramework.jar
        Note: (Device Application Designer only) Select the version of BOBFramework.jar that corresponds with selected Device Application Designer code generation options (BlackBerry rapc compiler version) from these supported versions: 4.2.1, 4.3.0, 4.5.0, 4.6.1, or 4.7.0.
    • For MBO generated code – these UltraLiteJ.jar and sup-client-rim.jar files to the project:
      • <UnwiredPlatform_InstallDir>\Servers\UnwiredServer\ClientAPI\UltraliteJ\J2meRim11\UltraLiteJ.jar
      • <UnwiredPlatform_InstallDir>\Servers\UnwiredServer\ClientAPI\java\RIM42\sup-client-rim.jar
  6. Click OK.
  7. Right-click the supOptions project and select Add file to project to add files for the project, which depends on whether you are creating a device application directly from MBO or from Device Application Designer code:
    • MBO generated code – references the Client object API and contains the Java files that implements the business logic of your project. From Look in, navigate to the src subdirectory where you generated the Java code from your Unwired WorkSpace mobile application. This location is dependent on the workspace that you used.

      For example, if your workspace is in the C:\myBBapplications directory and the name of the mobile application project is test, navigate to C:\myBBapplications\test\Generated Code\src\test and add all of the .java files to your project.

    • Device Application Generated code – references the Device Application Generated code, BOBCOptionsDefinition.java (the options definition), and OptionsMain.java. Complete these additional steps:
      1. Verify that the generated code is the correct version (you can see the version from the Device Application Designer generation wizard).
      2. From Look in, navigate to the object API code at the generated location and add it to the project: <workspace>\.metadata\.plugins\com.sybase.uep.bob.rim\<bobfilename>\object_api\genfiles\java\src
      3. Locate the options definition file at the following location and add it to the project: <workspace>\.metadata\.plugins\com.sybase.uep.bob.rim\<bobfilename>\generated\com\sybase\uep\bobclient\options\BOBCOptionsDefinition.java
      4. Locate OptionsMain.java at the following location and add it to the project: <UnwiredPlatform_InstallDir>\Unwired_WorkSpace\Eclipse\sybase_workspace\mobile\eclipse\plugins\com.sybase.uep.bob.rim<version_time_stamp>\generate\blackberry\src\com\sybase\uep\bobclient\options\OptionsMain.java