loading resources from another module on a Blackberry

Hello

Let’s say I have two code modules installed on my Blackberry: module A and module B. Module B is full of images and config files, while module A is full of code. It has been posted on the Blackberry Dev forum that code in module A can access resources in module B in the following way:

Class.forName("com.class.in.module.B").getResourceAsStream("/imageB.png");

I have had varied success with this method, and somehow deleted the only version of my code and project that worked. Does anyone have experience loading resources from other code modules on the Blackberry? If so I’d be all ears. Ideally module B will be created sometime after the application is deployed and module A would have no declared dependency on module B.

For reference here is the original thread from the Blackberry forum. (I hope it’s cool to post it here) http://www.blackberry.com/developers/forum/thread.jsp?forum=1&thread=4697

Cheers!