Setting up in Eclipse

To setup your application in Eclipse, perform the following tasks:
  1. Download and install the BlackBerry Java Plug-in for Eclipse.

    To download for Windows XP,Windows Vista, or Windows 7, visit https://bdsc.webapps.blackberry.com/java/download/eclipse. To download for Mac OS, visit https://bdsc.webapps.blackberry.com/java/download/eclipse?os=mac.

  2. Extract the files from the Advertising Service SDK to an appropriate location on your computer.
  3. Create a BlackBerry application project.
  4. Add the Advertising Service library to your project.
  5. Add Javadoc comments for the Advertising Service API to your project (optional).

Create a BlackBerry application project

You must create a separate project for each version of BlackBerry Device Software that your application runs on.

  1. In Eclipse, on the File menu, click New > Project.
  2. Expand the BlackBerry folder and select BlackBerry Project.
  3. Click Next.
  4. In the Project name field, type a name for the project.
  5. Select the Create new project in workspace option.
  6. Specify the version of BlackBerry Device Software that your application is designed to run on by performing one of the following actions:
    • To specify a version that is different from the default version for your workspace, select Use a project specific JRE and select the appropriate version.
    • To use the default version for your workspace, select Use default JRE.
  7. Click Next.
  8. Click Finish.
Back To Top

Add the Advertising Service library to your project

  1. In Eclipse, in the Package Explorer view, right-click your project.
  2. Click Build Path > Configure Build Path.
  3. On the Libraries tab, click Add External JARS.
  4. Navigate to the location that you extracted the Advertising Service SDK to and double-click the folder for the version of BlackBerry Device Software that your application is designed to run on (for example, double-click the 6.0 folder if the application runs on BlackBerry 6).
  5. Double-click the net_rim_bbapi_adv_app.jar file to add the library file to the project.
  6. On the Order and Export tab, select the net_rim_bbapi_adv_app.jar check box.
  7. Click OK.
Back To Top

Add Javadoc comments for the Advertising Service API to your project

To permit the Javadoc comments for the Advertising Service API to display when you move the pointer over a class name or method name in a Java source file, you must add the .html files that contain the Javadoc comments to your project.
  1. In Eclipse, in the Package Explorer view, right-click the project that you want to add the Javadoc comments to.
  2. Click Build Path > Configure Build Path.
  3. On the Libraries tab, expand the .jar file for the Advertising Service library.
  4. Click Javadoc location: None.
  5. Click Edit.
  6. Navigate to the location that you extracted the Advertising Service SDK to and click the Javadoc folder.
  7. Click OK.
  8. Click Validate to verify that the folder contains valid Javadoc files.
  9. Click OK.
Back To Top
Previous topic: System requirements

Was this information helpful? Send us your comments.