Skip to main content

Netbeans+Blackberry+Lwuit

Posted by mikevegap on November 12, 2010 at 10:57 AM PST

Hi, this post will try to guide you to develope an BlackBerry+LWUIT easy sample using Netbeans 6.9.

I was looking for a simple step by step guide to do it, but i found that many resources were removed, making the learning a little hard. But here i present a very simple and functional tutorial about this, enjoy it...
 

1. Download the JDE versions, I recommend 4.7.x (for Storm support).

2. Download Netbeans 6.9.

3. Download and install the Netbeans BlackBerry Plugin from: http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=11194

4. Download BB AnT Tools, make sure you are using Ant 1.7 or higher.

This will provide support for tasks like:

  • rapc
  • sigtool
  • alx
  • jadtool

5.Unzip and copy the file "bb-ant-tools.jar" to the ${Netbeans-home}/java/ant/lib directory.

6.Fetch the LWUIT sources from SVN and open the BlackBerryPort project.

Clean & Build

the project (notice that you MUST clean & build, a plain build will often fail since the RIM port needs to replace some classes from LWUIT).

7.
Remove: com.sun.lwuit.animations.Transition3D.java file from the LWUIT MIDP source code and clean & build.
7.1. This is important, because, Blackberry doesn't support M3G classes.

7.2. Or if don't want to remove that file, try to look for preverify task, then you can do a bit of testing and ensure that it doesnt preverify the library. Netbeans ant plugin is a pretty simple setup and you can change it which ever way you want to.


8. Clean & Build the BlackberryPort (BlackberryPort is within the LWUIT source code, both LWUIT and BlackberryPort are netbeans projects).
9. Download helloLwuit demo project (this is copy with a little variation of the file provided by
Steve Zhang's blog).

 

Try it...

To know more about the ANT build files, review the references.

 

References

http://javamvp.blogspot.com
http://lwuit.blogspot.com/2009/11/building-project-on-blackberry.html
http://code-dojo.blogspot.com/2010/05/ant-build-script-for-lwuit-blackberry.html
http://stackoverflow.com/questions/2578403/error-preverifying-class-netbeans-6-8-using-lwuit-api

Comments

Netbeans+Blackberry+Lwuit

Hi... Miguel...
Your arcticle is very helpful for me to learn. Would you mind sharing the whole Netbeans project for this article. Although, I have follow your instruction, I am still facing problem during clean and build for the prerequisite file. (point 6 and 8). Thanks a lot for your kind assistance.