Thursday, December 9, 2010

A Better Way To Blackberry And Misc Announcements

In the past I posted some instructions on how to get LWUIT working on the blackbberry with the Netbeans IDE's using bbant. In my usual fashion these were somewhat complex instructions that caused quite a bit of grief.
There is a better way! Chen came up with it for the 1.4 release, I originally discounted it since I tried something similar which didn't work. I now tried it again and understood that the methodology allows for something much simpler:

  1. Install the desired JDE versions (we recommend 5.0 for touch and 4.2 if you need legacy support, notice that you should install both if you want both!).
  2. Install the Netbeans blackberry plugin from here.
  3. Select the RIM platform using the standard add platform button (the manage emulators button in the platform tree node in the properties dialog). That's it if you just want to write MIDlets!
  4. To write applications (which is where I failed last time) you need to fix the build-impl.xml which incorrectly generates a MIDlet. To prevent your changes from being overwritten you can just paste them into your standard build.xml.
    Open your build-impl.xml (within the nb-project dir) search for the target "create-cod" and copy the entire target to your build.xml.
    Replace the <arg value="-midlet"> argument with <arg value="-cldc">
That's much simpler...

Besides this I was asked to post about a couple of upcoming events specifically JavaOne Beijing & Brazil both of which seem to contain LWUIT related talks although I'm not sure who will be giving them. In Beijing specifically there are:
Rich Applications and Services for the Mobile Masses (1265)
Introducing Java TV Widget Development (2685)
Writing Stunning Cross-Platform Applications Using LWUIT (1245)
Which are all LWUIT related (the last of which seems to be Chen's J1 session). 
If you are a developer in China we would appreciate some application information/screenshots (sent to out lwuit at sun dot com address), there is some push within Oracle for LWUIT in China and our managers have specifically asked for such applications.  


  1. the text seems to be incomplete. just before its simpler.

  2. Also possible for de eclipse IDE?

  3. Dead link:

  4. This comment has been removed by the author.

  5. Hi I tried using this method.
    I'm not familiar with netbeans but this is the error I get

    \Running\nbproject\build-impl.xml:1463: The following error occurred while executing this line:
    \Running\build.xml:96: echo doesn't support the nested "loader" element.

  6. Are you sure you copied just the create-cod target and didn't accidentally paste something else as well?

  7. Thanks for your post and i am now able to run my midlet on balckberry 5.0 app from netbeans directly. But i am struck with an issue while debug. My midlet name is TS. While debugging, I got an error message box like "cannot find the file TS-6.debug, and then TS-7.debug,TS-1.debug etc. In my simulator folder i could only see one TS.debug file. What i need to do to generate those files and debugg correctly using the plugin?

  8. I get the same messages and don't really use the blackberry debugger. In the past I got it to work and the debugging was so slow it was completely unusable to me.

  9. RIM suggests always using a CLDC application, their performance and permission handling varies allot between CLDC apps and MIDlets.