First Steps (Samples, Simulator, Debugger)

Lets do some first steps after finishing installation and configuration of BlackBerry Java Eclipse.

Import Samples

You can import Sample Projects to take a first look at a BlackBerry Java App. Go to Import | BlackBerry | Import BlackBerry Samples:

Using PlugIn 1.3 you can also import samples from Toolbar:

…or from new BlackBerry Menu:

You’ll see a list of available Sample Projects:

Hint: the list of samples depends from the JRE you select !

For now we only want to do first tests if our installation works well – so we only check the “Hello World Demo” to be imported into the workspace.

Launch Configurations

ATTENTION: if using Eclipse Plug-In 1.3 BETA on OSX there are no simulators yet ! So you can run and debug only on real devices ! more info see here.

To Run a BlackBerry Application like “Hello World” we need a Launch Configuration – this is similar to Launch Configs for Eclipse Applications you perhaps are familiar with.

Run | Run Configurations… allows to create or edit Launch Configurations:

Please select BlackBerry Simulator and create a new launch configuration:

Name this configuration as you like it. We’ll use all defaults, but jump to the “Simulator” tab and select the Simulator you like:

…in this case the  “9800” was selected as Device (Torch). Now you can “Apply” and “Run” the Launch Configuration.

The Simulator should be opened and simulating the device you have choosen.

under “All” you’ll find the Hello World Application:

…and you’ll find the “Hello World” application. Doubleclick on it and the “Hello World” app is greeting you🙂


Now we want to test if the debugger is working. Same as Run… you can Debug… using the same Launch Configurations:

If the Simulator is still open, the debugger will be attached to the running Simulator – if there’s no Simulator open, a new one will be started together with the debugger.

Also you’ll notice that the Debugger Console View will print messages and if you switch to Debug Perspective you’ll see Threads running:

The Debugger works similar to the normal eclipse Java debugger – demonstrating the power of the Debugger will be part of other blogs.

MDS-CS (Mobile Data system Connection Service)

If we want to access the web from inside the Simulator (running normal or debugging) we need another Tool – the MDS-CS which will be normaly part of the BES (BlackBerry Enterprise Server).

Please open the “Hello World” launch configuration and take a look at the “general” tab:

…here you can check, that MDS-CS should be launched together with the simulator. MDS-CS will be simulated using Tomcat.

You can easy check if the MDS-CS is working: open the Browser App:

…and try  to open the Home Page from BlackBerry Bookmarks – if all went well, you should get this site:

if it doesn’t work check that you have Internet Access from Windows browser, check your Firewall or Network configuration.

Congratulations: you can launch and debug applications and access the web from inside your Simulator.

back to the overview
if you like my work, you can Flattr this

4 responses

  1. Nice tutorials, but i have a problem ..

    I can’t run the “Hello World” or any other app in the simulator, any idea why ?

    • have you tried another Simulator ? perhaps there’s a problem with your Simulator.
      you can download Simulators and select which one to use from launch config.

Leave a Reply

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

You are commenting using your 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