I started porting a Java client application on Nokia N800 on which I had installed Java CDC (binary). Quite soon after starting the building, I noticed that the log4j libraries are not going to work on CDC device because of lack of support for reflection API. For this I removed (with some python scripting and manual fixing) all the logging information from the project, and managed to build and run the project without log4j dependency.
However, some of the libraries in my project used commons-logging library, and I was very lucky to find a patched version, which enables running commons-logging on J2ME (Java CDC) device.
You can find information on how to build Java projects to run on different platforms, from here. I modified the javac task, by adding compiler, source and target definitions as follows to make code that runs on CDC Java.