Run your app on a device or a simulator

After you finish writing the code for your application, you can use the toolbar to run your application on a device or simulator. When you use the toolbar, you do not need to create a BlackBerry target or a launch configuration, because the IDE creates them for you. However, you can create them manually.

For information about using the toolbar when you develop an application, see Toolbar overview and Application development workflow.

  1. To create a BlackBerry Target, from the menu, select File > New > Other….
  2. In the list, expand BlackBerry, click BlackBerry Target, and then clickNext.

    New BlackBerry        target project information

  3. In the Target Name area, you can either use the same name as your host, or you can specify a new name for your target.

    Although the wizard allows it, don't use any of the following characters in your target name as they may cause problems later:

    | ! $ ( " ) & ` : ; \ ' * ? [ ] # ~ = % < > { }

  4. In the Connection area, specify the name of your host, or the IP address you want to use for the connection.
  5. Click Finish. Your new BlackBerry Target System Project appears in the Project Explorer view. When you create a launch configuration, the target is listed under the Main tab in the Target Options pane. Note that you can use the Add New Target button in the Target Options pane to open the New Target System Project wizard.

    You can also reach the Target System Project wizard from within the Target Navigator view (right-click, then select Add New Target).

  6. Make sure you build your project first before you create a launch configuration for it.
  7. To create a launch configuration to run your project, in the Project Explorer view, expand the Binaries folder.
  8. Right-click on your project's executable file.
  9. Select Run As > BlackBerry C/C++ Application Dialog (or Run As > Blackberry C/C++ Application if one was created previously).
  10. At a minimum, you are required to select a target for your project; however, take note of the many other options available on the various tabs.
Your program runs, and the IDE shows its output (if any) in the Console view.

Last modified: 2013-12-21

comments powered by Disqus