Home > Uncategorized > Setting up a PC for Blackberry Java Development

Setting up a PC for Blackberry Java Development

We’re setting up a computer for Blackberry Java Development. Here’s the process we’re employing:

  1. Rebuild a computer with a fresh install of Windows 7 Pro (Actually, I think we installed Ultimate)
  2. Install all updates, a firewall, and those important things you do to any new computer
  3. Install Java JDK for our computer:
    1. Download Java 6 JDK here: http://www.oracle.com/technetwork/java/javase/downloads/jdk6u35-downloads-1836443.html
    2. Download Java 7 JDK here: http://www.oracle.com/technetwork/java/javase/downloads/jdk7u7-downloads-1836413.html
  4. Install Eclipse for Mobile Developers
    1. Download here: http://www.eclipse.org/downloads/packages/eclipse-mobile-developers/junor
  5. Update the PATH environment variable to point to the most recent installed JDK (7 in our case)
    1. Go to Control Panel / System
    2. Click Advanced System Settings
    3. Click Environment Variables
    4. Add “;C:\program files\java\jdk1.7.0_07\bin” to the PATH variable (adjust accordingly)
  6. Added a JAVA_HOME environment variable pointing to that same path (use same instructions as previous step)
  7. Download Eclipse and the the Blackberry Java SDK
    1. Download Eclipse and the Blackberry Java SDK: https://developer.blackberry.com/java/download/eclipse
      1. Note: if you already have an Eclipse environment set up, there are instructions on how to add the BB SDK to that.
    2. Run the downloaded installer. This will install Eclipse 1.5.2 and Blackberry Java SDK 7.1.0 We’re going to install older versions of the BB Java SDK as well, but will get to that later.
    3. Install to C:\Eclipse
    4. Once installation has completed, open Eclipse
  8. Start Eclipse and update BB Java SDK’s
    1. You’ll be asked for a workspace. We chose C:\Users\User\workspace
    2. If you want to install additional Blackberry SDK (we want v5), do the following:
      1. In the Eclipse Help menu, click Install New Software
      2. In the Work with Dropdown box, click the Blackberry Update Site (or add it using http://www.blackberry.com/developers/jar/win/java)
      3. Expand the BB Java Plugin category and select the one you want. We went ahead and installed 5 and 6.
      4. Continue and restart Eclipse when complete.
  9. Create sample BB Java App
    1. Open Eclipse using the BB Icon
    2. Before you begin: Make sure you turn on BB Application Development Perspective (Window / Open Perspective / Blackberry Application Development)
    3. Start a new project: Blackberry menu item / New / Project
      1. Project Name: HelloWorld
      2. Specific JRE: Blackberry JRE 5
      3. Next
      4. Next
      5. Template: Hello Blackberry
      6. Next
      7. Package Name: HelloWorld
      8. Finish
  10. Run on a simulator
    1. Select the project, Select Run As / Blackberry Simulator.
    2. Added a breakpoint (right click in left margin of code) to popup to verify debugging live.
    3. Right click the project, select Debug As / Blackberry Simulator
    4. When the system encountered the breakpoing, it asked me to open a new perspective, which I did.
    5. Breakpoints stop within the code.
  11. Select a different phone to simulate on
    1. Right click the project, Select Debug As / Debug Configurations
    2. Select Blackberry Simulator/ProjectName
    3. Select the Simulator tab
    4. Select a device from the list
  12. Run on a smart phone
    1. Get singing keys from RIM if you’ll be using protected RIM API’s (we will be)
    2. Install Blackberry Device Manager
    3. Download and install appropriate debug simulator for your device (needed for device debugging as well)
      Make sure you download a version at or OLDER than what’s on your device. We started with 1076 when we should have got 912 because our device is on version 955, for example.
    4. Connect the smartphone device to your computer
    5. Click the debug button and choose Blackberry Device.
    6. You can (or at least I think you can) ignore the errors about all the missing DEBUG files. These appear to be for apps we’re not debugging, anyways.
    7. Set a test breakpoint, and away you go.
Advertisements
Categories: Uncategorized
  1. Gerard
    February 27, 2013 at 5:14 pm

    Wich version of Java JDK should I use x86 or X64?

    • February 28, 2013 at 9:07 am

      If there are different JDK’s for different processors (I don’t recall), then I think you’d be best off to use the one compatible with the processor on your computer. I would ALSO think the x86 JDH would be compatible on either platform, although it would not be optimized for a 64 bit machine.

    • August 27, 2013 at 8:24 pm

      I suggest you use the one that goes with your PC’s processor – x86 for 32 bit processor, or X64 for 64 bit processor.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: