Setting up your application in Eclipse
To setup your application in Eclipse®, perform the following tasks:
- 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.
- Create a BlackBerry application project.
- Add the Analytics Service library to your project.
- Add the Analytics Service configuration file to your project.
- Add Javadoc comments for the Analytics Service APIs to your project (optional).
Create a BlackBerry application project
- In Eclipse®, on the File menu, click New > Project.
- Expand the BlackBerry folder and select BlackBerry Project.
- Click Next.
- In the Project name field, type a name for the project.
- Select the Create new project in workspace option.
- To target a specific version of theBlackBerry® Device Software, select Use a project specific JRE, and click a version of BlackBerry Device Software.
- Click Next.
- Click Finish.
Add the Analytics Service library to your project
- In Eclipse®, in the Package Explorer view, right-click your project.
- Click Build Path > Configure Build Path.
- On the Libraries tab, click Add External JARs.
- Navigate to the location that you extracted the Analytics Service SDK to and double-click AnalyticsService_v1.0.jar.
- On the Order and Export tab, select the AnalyticsService_v1.0.jar check box.
- Click OK.
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.
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.
- In Eclipse®, in the Package Explorer view, right-click your project.
- Click Build Path > Configure Build Path.
- On the Libraries tab, expand AnalyticsService_v1.0.jar.
- Click Javadoc location: (None).
- Click Edit.
- Select the Javadoc URL option.
- Click Browse.
- Navigate to the location that you extracted the Analytics Service SDK to and click the javadoc folder.
- Click Validate to verify that the folder contains valid Javadoc comments.
- Click OK until the Properties window disappears.
Next topic: About applications
Previous topic: Configuration settings