BlackBerry Application Development Tutorial – Part 2

Aasim Naseem 17

Hello All; hope that everything is going good …

Today I’m going to tell some basics requirements to start your BlackBerry application development. Today you will build your system with all the necessary tools and will be ready to write your first program for blackberry … don’t think about hello world … we will use some other name

Note: This tutorial is a part of series of my tutorials on blackberry application development; So far we have discussed the following.

Ok friends … let us start…. First of all a good news .. BlackBerry application development is java based … heyyyy cheerrrsss … You don’t need to have an extra machine to develop applications or install simulator type tool like in the case of iPhone … if you are a java developer, and already doing java development then u just need to install few more things to jump into BlackBerry’s world …

My English isn’t too good but my java language is somehow .. so don’t concentrate on what I’m saying … just focus on what I want to teach … else you will find a lot of EnglishGrammarException or SpellExceptions .. 🙂

For those who are already doing java development skip this step, for those who are new to java, they must download and install the java development kit (JKD). Currently, version 6 is the latest so you must use it. Next, we will use Eclipse IDE for our development and debugging. As the eclipse is free with many useful Plug-ins. The next step is to download BlackBerry JDEs and a plug-in of blackberry for eclipse and a simulator for the device.
So open your downloader and start downloading required items from the following links

After downloading JDK install it to your preferred location, then edit a “path” environment variable entry, append the [java-instal-dir]\bin … like in my case, I appended the entry c:\Program Files\Java\jdk1.5.0_06\bin in path variable after placing semi-colon in the previous entry.

Start your eclipse you just download (or in case your are already using it,just open it) . its time to configure your eclipse with blackberry tools.
1. Install the JRE

  • Click Window > Preferences from the main menu in Eclipse
  • Click Java > Installed JREs
  • Click Add.
  • Fill the fields:
    • JRE type = Standard VM
    • JRE name = ‘RIM JRE’
    • JRE home = path to the JDK (eg. C:\jdk1.6.0_06)
    • Default VM Arguments leave blank
  • In the JRE system libraries box, select all of the entries and click Remove.
  • Click Add External JARs and navigate to the lib directory of the BlackBerry JDE (eg. C:\jde\lib).
  • Select the file net_rim_api.jar.
  • Back in the JRE system libraries box, select the new entry for net_rim_api.jar
  • Click OK to close the Add JRE window.
  • In the Installed JREs window, check the box next to the new RIM JRE entry.
  • Click on the prior entry in this list (for jre1.6.0_06) and click the Remove button.
  • Click OK to close the Preferences window.

2. Set the JDK Compliance Leve

  • Click Window > Preferences from the main menu in Eclipse
  • Click Java > Compiler
  • Change the ‘Compiler compliance level’ to 1.6.
  • Click OK to close the Preferences window.

3. Increase debugger timeouts

  • Click Window > Preferences from the main menu in Eclipse
  • Click Java > Debug
  • Increase the Lauch timout by a factor of 10 (eg. set to 200000)
  • Increase the Debugger timeout by a factor of 5 (eg. set to 15000)
  • Click OK to close the Preferences window.

Your eclipse is ready to write your first program for blackberry. In the next post i will illustrate basic structure of BB’s application and main program.

Tags:

17 Replies to “BlackBerry Application Development Tutorial – Part 2”

  1. where is next part .. m waiting ma friend .. why there is a looooooooooong absence ….. where have you been …..

  2. Hi Aasmi,

    Just started to look into blackberry programming using lotus notes and as i have done Java before and have certification in that. I must have trouble interperting the code into Lotus Notes which is possible also. I would be needing your help looking out for best book on this topic.

  3. I really love your article, it’s rock !!

    I just use my first BB 9780 for 1 month and I found that RIM missed a lot of common things in their new OS6 (But they also got a lot of ultra cool functions) and I have to pay for some of that kind of functions such as add2contact so I decided to do the program by myself while I got basic programming skill in Java and C++.

    I googled and found your article, it is luck.

    Thank you !

  4. hi Aasim sir,i m new to blackberry.i m developing a Blackberry app that will turn off all the light of blackberry at the time of phone call..i have implemented a lot abd stuck in middle as my trackball light always glows whenever i receive a call..it will keep glowing till phone gets connected..is there any way so that i can make my lights off during call.

    1. Need to dig the issue; Like you want no indication by lights when call received; Right?
      Let me see if i can find something;
      Thanks alot for posting your comment here;

  5. I’ve been exploring for a bit for any high quality articles or weblog posts in this sort of area . Exploring in Yahoo I finally stumbled upon this site. Studying this information So i’m satisfied to convey that I have an incredibly good uncanny feeling I came upon just what I needed. I such a lot indisputably will make certain to do not forget this web site and give it a glance on a relentless basis.

  6. I really like your blog.. very nice colors & theme. Did you design this website
    yourself or did you hire someone to do it for you?
    Plz reply as I’m looking to create my own blog and would like to know
    where u got this from. thanks

Leave a Reply

Your email address will not be published. Required fields are marked *