The .zip for the sourcecode examples on Forum Nokia (i.e. 'MIDP_Example_Applications_1.4.zip' or whatever the latest version is) contain Ant build files and the top-level 'midp/examples' README file has more info. Some of the examples use the Nokia UI API.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com