Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
05-06-2009 05:33 PM
Hi guys. I have built new projects to simplify my problem as much as possible before presenting it here.
Using Eclipse 3.4.2 with BB plugin (all recent stuff).
I built a simple Hello World app called BBHello that ran fine by itself in the simulator, and on the actual BB. I then created a new project called ClientLib in the same workspace. This simple project has a class with a public method getMessage() that returns "foobar". I exported the new project jar file as "eclibb.jar". I added eclibb.jar to BBHello, to the Java Build Path via "Add External JARs". I edited BBHello to call the getMessage() method that resides in my new external jar file.
It builds fine. If I choose "Run as" Java application, I can run the main() method I put in ClientLib as a test. Everything looks fine.
But when I "Run as" Blackberry Simulator, I get "Module 'eclibb' not found". I have tried everything and failed. I am rather desperate...
Any help is *much* appreciated. --fd
05-06-2009 05:55 PM
BlackBerry (simulator and device) only run cods not jars. However a cod is basically a packed up jar with all the compiled classes in it. You can convert from a jar to a cod - well I believe you can, I've never done it myself, but if you search on this forum you will find posts from people who have and I think there is a KB article which tells you how to do it too.
So you need to get your eclibb.jar converted to a cod and put this in the simulator and device.
In fact, if you have compiled it as a project then it is likely that you have already created a cod file for it. Have a look in the same directory that you found the jar and there is probably a cod there too. You can just copy that into the Simulator directory.
Hope this helps
05-06-2009 09:11 PM
> You can convert from a jar to a cod - well I believe you can, I've never done it myself,
>but if you search on this forum you will find posts from people who have and I think
> there is a KB article which tells you how to do it too.
All I could find were discussions about how to do it using the RIM JDE, not Eclipse with BB plugin.
> In fact, if you have compiled it as a project then it is likely that you have already created a
> cod file for it. Have a look in the same directory that you found the jar and there is probably
> a cod there too.
Well originally my jar was from a non-Blackberry project, but following your suggestions I
made a new "Blackberry project" and created a cod file. My app now has this new project jar on its classpath.
> You can just copy that into the Simulator directory.
I put the new project cod file, and all the other eclibb.* files into
where I saw other cod files. Is that right? I do have another simulator directory that I left alone:
C:\Program Files\Research In Motion\BlackBerry JDE 4.7.0\simulator\java
Now at runtime in the Simulator I do not get the "Module not found" message. But I get "class com.xx.yy.Eclib not found".
It sounds like my cod is rather empty. At this point I'm feeling like my cod *piece* is empty, in addition to my cod *file*.
Any suggestions (with the latter problem that is)? Thanks Peter --fd
05-07-2009 04:14 AM
"my cod *piece* is empty" -
Since I'm not an Eclipse user, I can't really comment on your build process.
Re searching, I forgot to mention that the tool that does the conversion is called rapc and you will have it with you plug-in, so search for "rapc cod jar" and you should get a few hits. This one looks fairly useful:
There is a KB article about it too: