Gospel Library for BlackBerry getting started
Contents
|
Development environment
Because of the large number of existing BlackBerry users still using older devices, we must target our official releases at OS 4.2.1. This means we won't have access to some of the newer APIs that might make our job easier, such as those that support SQLite databases (new in OS 5.0).
With the release of the BlackBerry JDE Plug-in for Eclipse 1.1, component packs older than 4.5.0 are not available on the standard update site. As of 26-Jun-2010, component packs for 4.3.0 and 4.2.1 are available on the update site for the Beta version of the 1.1 JDE plug-in.
To target OS 4.2.1, there are a few options:
- Fresh install of Everything
- Add the BlackBerry JDE plug-in for Eclipse 1.1 Beta update site.
- Configure the BlackBerry JDE Plug-in for Eclipse v1.1 to use the 4.2.1 Component Pack from the 1.0 plugin.
- Use an existing installation of the BlackBerry JDE Plug-in for Eclipse v1.0
- Target a later version, but only use APIs supported by 4.2.1
- Use the 4.2.1 BlackBerry JDE
Fresh install
The following will steps will help you set up Eclipse if you've never set up Eclipse for BlackBerry development (or you're tired of trying everything else that doesn't seem to work).
Prerequisites
You need to download the following:
Installation of Eclipse
Eclipse does not require an official installation process. Just extract the zip file to C:\eclipse.
Installation of BlackBerry JDE
The BlackBerry JDE gives you the device simulator for running, debugging, and testing your application
- Run the BlackBerry JDE v4.2.1 downloaded installation and follow the instructions.
Installation of BlackBerry Java Plug-in for Eclipse
- After you've extracted eclipse to C:\eclipse, run the BlackBerry Java Plug-in for Eclipse.
- Follow the instructions in the installer.
Install the Subclipse Plug-in for Eclipse
- Open Eclipse.
- Click on Help -> Install New Software...
- In the Install window, enter http://subclipse.tigris.org/update_1.6.x in the "Work with:" area. Press Enter.
- Click on Subclipse, then click Next.
- Click Finish.
This should get your development environment ready for development.
Using the 4.2.1 BlackBerry JDE
There's not much to say here. Just install the JDE and configure a project using the source files from the Subversion repository.
Using the BlackBerry JDE Plug-in for Eclipse v1.0
This tool is being discontinued by RIM. While you can still download the plug-in itself, it's no longer possible to obtain the 4.2.1 Component Pack from RIM's web site. If you don't already have it installed you cannot use this option.
Targeting a later OS version
You can use tools that support newer OS versions, including the BlackBerry JDE Plug-in for Eclipse v1.1, but refrain from using any APIs not supported by 4.2.1. The Blackberry API Javadoc indicates the minimum OS for each class and method it describes. If you select this option you may contribute source code to the project but you will be unable to test against a 4.2.1 simulator.
Configuring the BlackBerry JDE Plug-in for Eclipse v1.1 to use a 4.2.1 Component Pack from the v1.0 plugin
Note: You must have a previous install of the BlackBerry JDE Plug-in for Eclipse v1.0, including the 4.2.1 Component Pack. The component pack can no longer be obtained from the BlackBerry web site.
- Install Eclipse IDE for Java Developers 3.5
- Install Blackberry JDE Plug-in for Eclipse 1.1
- Copy net.rim.eide.componentpack4.2.1_4.2.1.17 folder from Eclipse 3.4.1 plugins directory to Eclipse 3.5 plugins directory.
- Create a text file with the following content:
-Dee.home=C:\Program Files (x86)\Eclipse 3.5\plugins\net.rim.eide.componentpack4.2.1_4.2.1.17\components
-Dee.executable=${ee.home}\simulator\fledge.exe
-Dee.bootclasspath=${ee.home}\lib\net_rim_api.jar
-Dee.javadoc=file:${ee.home}\docs\api
-Dee.language.level=1.3
-Djava.home=${ee.home}
-Dee.name=BlackBerry JRE 4.2.1
-Dee.description=BlackBerry Java API Definitions, simulators and utilities for BlackBerry smartphone OS version 4.2.1.17
-Dee.copyright=Copyright (c) Research In Motion Ltd. 1997-2009 All Rights Reserved.
-Dee.output.folder.suffix=4.2.1
Be sure to edit the path in the first line if you've installed Eclipse 3.5 in a different directory. Save this file in the directory indicated in the first line. Name it BlackBerry.ee.
- Configure Eclipse to use the 4.2.1 Component Pack
- Open Eclipse 3.5.
- Open Windows -> Preferences, then navigate to Java -> Installed JREs.
- Click Add...
- Select "BlackBerry Execution Environment VM" and click Next
- Click the "File..." button next to Definition File and browse to the BlackBerry.ee that you created earlier.
- Click Finish
You should now be able to target BlackBerry OS 4.2.1 with the Eclipse 4.5 IDE and the BlackBerry JDE Plug-in 1.1.
Project source code
The Subversion repository for this project is located at https://dev.lds.org/svn/scriptures/blackberry/
To open the project:
- Open Eclipse.
- Open File -> New -> Project...
- Expand SVN. Select Checkout Projects from SVN and click Next.
- Select Create a new repository location. Click Next.
- Type in the repository url (https://dev.lds.org/svn/scriptures/blackberry/)
- Expand trunk and select BBScriptureReader. Click finish.
This will check the code out. In order to build and run, you may have to do the following (I did).
- Right click your project folder. Select Build Path -> Configure Build Path...
- Click Add Library...
- Select JRE System Library and click Next.
- Select Alternate JRE and BlackBerry JRE 5.0.0 from the drop down menu.
- Select JRE System Library (BlackBerry JRE 4.2.1) and click Remove.
- Click Finish.
You should be set up and ready to go.
Bugs and feature requests
The JIRA issue tracking system is located at https://tech.lds.org/jira/browse/MSBB/

