Lab BlackBerry Example

From CDOT Wiki
Revision as of 21:25, 26 February 2011 by Jordan.anastasiade (talk | contribs) (2)
Jump to: navigation, search

This lab example allows you to understand the process of building a BlackBerry application using Java Plug-in for Eclipse

Step 1.

File->New->Others->BlackBerry Project Note: If you want really to learn how to build a BB app, then in the wizard choose the Empty Application option. The structure of BB project will be defined, but as the level on code generation, one will get only an empty Java app, with a code similar with this:

package mypackage;

public class MyApp{
    /**
     * Entry point for application
     * @param args Command line arguments (not used)
     */ 
    public static void main(String[] args){
    }
}

Step 2.

In the main method create a new instance of the application and make the currently running thread the application's event dispatch thread.

    MyApp theApp = new MyApp();
    theApp.enterEventDispatcher();