Skip to content

Setting up the development environment on Windows

willworden edited this page Sep 27, 2011 · 16 revisions

Installing the Blackberry JDE, etc.

I found these instructions on the PhoneGap wiki very useful for setting up my RapidFTR development environment:

Setting up Blackberry environment (Ignore all steps relating to PhoneGap, as we’re not using it.)

We are building against Blackberry JRE 4.6.1, so select the relevant component pack when following the instructions.

These instructions should be good for both Win XP and Win 7 systems. And presumably Vista. Used most recently on Windows 7 64-bit. As per instructions, install 32-bit versions of everything, including Eclipse.

Feel free to use my Blackberry Developer login: username: [email protected] password: rapidftr15GREAT

Git

You’ll also need to install Git (obviously!) msysgit seems pretty good for Windows.

Setting up the project

RapidFTR-Blackberry contains config files for both IntelliJ and Eclipse. Please note that you cannot run the simulator or debug through IntelliJ, so I tend to run both. Also, we do a have an open source license for IntelliJ Ultimate Edition, mail the group to get a license key.

Eclipse

Clone the RapidFTR-Blackberry Edition repo.
In Eclipse, create a New Blackberry Project..
Create project from existing source, and point it at the RapidFTR-Blackberry folder in the root of the cloned project.
Select BB JRE 4.6.1 (if given the option).
(Click next ,then Finish)

Right click project on Project Explorer, goto Configure Build Path. On the libraries tab, remove the regular JDK library, click add new library: User Library → Alternate JRE change the JRE library to Alternate JRE: Blackberry JRE 4.6.1.

You should now be able to use Eclipse to build, run and debug your code in the Blackberry simulator. Right click the Project, and select Run As, Blackberry Simulator.

There is a separate Eclipse project for the unit tests. This lives in the RapidFTR-Blackberry-Tests folder in the root of the cloned project. These need to build / run against your regular J2SE JDK, so configure build path as any usual Java project in Eclipse.

Installing Blackberry software updates
e.g. Other OS versions to compile against.

Goto Help → Install New Software.. For the update site, you can use: http://www.blackberry.com/go/eclipseUpdate/3.5/java Then use my Blackberry Developer logon details above.

IntelliJ

There is a single IntelliJ project with separate modules for code and tests. Since you won’t be using for IntelliJ for building or debugging, you can just use your regular J2SE JDK. If you are determined not to use Eclipse / Windows, you can use the BB Ant script for building deployable Blackberry applications.

Setting up Blackberry simulator under Windows 7

Creating a windows 7 Blackberry simulator requires two components, the simulator and BlackBerry® Email and MDS Services Simulator Package v4.1.4. Note, you must have WRITE access to the folder for it to work, and you may need to make an exception in your firewall to allow for internet connections. the MDS is necessary if you want to simulate internet connectivity, such as downloading the RapidFTR app to the phone.

In the directory where MDS was installed, you may need to modify the run.bat and replace:

!BMDS_CLASSPATH!;!BMDS_CLASSPATH2!

with:

%BMDS_CLASSPATH%;%BMDS_CLASSPATH2%

After this you should be able to double-click the run.bat to get it to launch. The simulator show now be able to be launched with internet connectivity.