The solution with the library works fine.
I have now defined the classes which are used from both applications (background thread and gui app) only once: in a separate library. And then set the project depencies from both projects to that library.
Problem is, that i now have to work with the RIM IDE (instead eclipse), which i don't like at all.
If somebdy knows how to configure the rapc-tasks in the ant file for building a library and including it into other projects, i would appreciate some advice.