Setting up the sample application in the BlackBerry Java Plug-in for Eclipse

Install the sample application

  1. In Eclipse®, on the File menu, click Import.
  2. In the Import dialog box, expand the BlackBerry folder.
  3. Click Import BlackBerry Samples.
  4. Click Next.
  5. Perform one of the following actions:
    • To specify a specific JRE™, select the Use a project specific JRE option.
    • To specify the default JRE in the workspace, select the Use default JRE option.
  6. In the BlackBerry Projects section, click Deselect All.
  7. Select the check box beside the udpdemo project.
  8. Click Finish.

Run the sample application

Before you begin:To perform this task, you must set Eclipse® to start the BlackBerry MDS Connection Service when you start the BlackBerry Smartphone Simulator.
  1. In Eclipse, in the Navigator pane, right-click the udpdemo folder.
  2. ClickRun As > BlackBerry Simulator.
  3. On the Home screen of the BlackBerry® Smartphone Simulator, click the Downloads folder.
  4. Click the UDP Demo icon.
  5. In your Eclipse installation folder, navigate to the udpdemo server folder. The default installation path is C:\Program Files\Eclipse\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.16\components\samples\com\rim\samples\server\udpdemo.
  6. Double-click run.bat to launch the server-side application.
  7. In the BlackBerry Smartphone Simulator, in the UDP Demo application, type a message and click Send. The message appears in the server-side application.

Was this information helpful? Send us your comments.