Setting up your application 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 the software for Windows® XP,Windows Vista®, or Windows® 7, visit na.blackberry.com/eng/developers/javaappdev/javaplugin.jsp. To download the software for Mac OS, visit na.blackberry.com/developers/javaappdev/macosx.jsp.

  2. Create a BlackBerry application project.
  3. Add the Analytics Service library to your project.
  4. Add the Analytics Service configuration file to your project.
  5. Add Javadoc comments for the Analytics Service APIs to your project (optional).

Create a BlackBerry application project

  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. To target a specific version of theBlackBerry® Device Software, select Use a project specific JRE, and click a version of BlackBerry Device Software.
  7. Click Next.
  8. Click Finish.
Back To Top

Add the Analytics 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 Analytics Service SDK to and double-click AnalyticsService_v1.0.jar.
  5. On the Order and Export tab, select the AnalyticsService_v1.0.jar check box.
  6. Click OK.
Back To Top

Add the Analytics Service configuration file to your project

You can also add configuration settings to your project using the WebtrendsConfig abstract class. For more information, see Loading configuration data.

You must add the configuration file to a package that contains .java source files for your application, otherwise your application might not be able to locate the file.

  1. On your computer, navigate to the location that you extracted the Analytics Service SDK to and copy the config.xml file.
  2. In Eclipse®, in the Package Explorer view, expand your project.
  3. Expand the src folder.
  4. Paste the configuration file in a package that contains source files for your application. If your project doesn't contain any source files, make sure to move the configuration file after you add the source files to your project.
Back To Top

Add Javadoc comments for the Analytics Service APIs to a project

To display the Javadoc™ comments for the Analytics Service APIs when you point to a class name or method name in a 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 your project.
  2. Click Build Path > Configure Build Path.
  3. On the Libraries tab, expand AnalyticsService_v1.0.jar.
  4. Click Javadoc location: (None).
  5. Click Edit.
  6. Select the Javadoc URL option.
  7. Click Browse.
  8. Navigate to the location that you extracted the Analytics Service SDK to and click the javadoc folder.
  9. Click Validate to verify that the folder contains valid Javadoc comments.
  10. Click OK until the Properties window disappears.
Back To Top
Previous topic: Configuration settings

Was this information helpful? Send us your comments.