Windows + eclipse environment configuration in BlackBerry Development

Source: Internet
Author: User

In this article, I will continue to learn about the Windows + eclipse environment configuration and Helloworld in BlackBerry development. I believe that through this article, you will have a deeper understanding of Black Berry development.

Windows + eclipse environment configuration and Helloworld in BlackBerry Development

Company colleague Frank sent a BlackBerry development link some time ago, and he downloaded the plug-in and played with the simulator.

Without looking at the relevant information, I wrote a helloworld according to someone else's environment.

1. Download and decompress Eclipsewww.eclipse.org) My version is 3.4.1

2. download and install the BlackBerry Eclipse plug-in BlackBerry_JDE_PluginFull_1.0.0.67 and the simulator BlackBerry_Simulators_4.5.0.173_8830. You can click the BlackBerry tab on the csdn homepage to download the software as prompted. PS is definitely not an advertisement. The benefits of CSDN are not for me)

3. Select newproject in eclipse after installation to check whether there are BlackBerry engineering options. If so, the Environment configuration is OK. Select to create a new project with the specified name.

4. Add sourcefile,

Enter the following code:

 
 
  1. packagecom.lc.blackberry;  
  2.  
  3. importnet.rim.device.api.ui.UiApplication;  
  4. importnet.rim.device.api.ui.component.Dialog;  
  5. importnet.rim.device.api.ui.component.LabelField;  
  6. importnet.rim.device.api.ui.component.RichTextField;  
  7. importnet.rim.device.api.ui.container.MainScreen;  
  8.  
  9. publicclassHellowordextendsUiApplication{  
  10.  
  11. publicstaticvoidmain(String[]args)  
  12. {  
  13. HellowordtheApp=newHelloword();  
  14. theApp.enterEventDispatcher();  
  15. }  
  16.  
  17. publicHelloword()  
  18. {  
  19. pushScreen(newHelloWorldScreen());  
  20. }  
  21.  
  22. finalclassHelloWorldScreenextendsMainScreen{  
  23. publicHelloWorldScreen(){  
  24. super();  
  25.  
  26. LabelFieldtitle=newLabelField("HelloBlackberrySample",LabelField.ELLIPSIS  
  27.  
  28. |LabelField.USE_ALL_WIDTH);  
  29.  
  30. setTitle(title);  
  31. add(newRichTextField("HelloBlackberry!"));  
  32. }  
  33. publicbooleanonClose(){  
  34. Dialog.alert("Bye-Bye!");  
  35. System.exit(0);  
  36. returntrue;  
  37. }  
  38. }  
  39. }  
  40.  

5. Compile and run

The above environment is based on the Java environment variables I have configured, because there are other environments on the machine, I do not know whether this has an impact. The above steps are not confirmed in the official documentation. If you have any problems, please search and solve them by yourself.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.