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:
- 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!).
- Install the Netbeans blackberry plugin from here.
- 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!
- 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">
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.