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.
08-29-2011 01:10 AM - edited 08-29-2011 12:48 PM
I have a trouble with an image resource and I think is so easy to fix but I just cant get the answer so far.
I'm trying to load an image using Bitmap.getBitmapResource("logo.png"). The problem is that is not working. I have checked the .jar file and the images are not there so obviously that is the matter. I just don't know how to make the eclipse to load the files into the jar file.
Just for the record:
* The files are directly in src folder.
* I have tried all the path combinations
* I have deleted and re-imported the images
* i have changed the SDK from 4.6.0 to 4.6.1
* I have recreated the project.
Nothing works!!!! . the .JAR file doesnt have the images inside,
A situation I just discovered is that if I use JRE 5.0, the same code, the same directory structure, it works fine. So the problem is with JRE 4.6 and 4.6.1. Somebody with the same problem?
08-29-2011 02:13 AM - edited 08-29-2011 02:14 AM
create new folder "res" if it's not there along with src folder & move your all images to this folder.
check the property of project:
check in your code that "/" (slash) is added before your image name in create Image method eg
08-29-2011 11:10 AM
Thanks to both of you, I tried both solutions, nothing works.
It is strange cause the only image that actually is inside the jar file is the app icon, so if I use
Bitmap imgHeader = Bitmap.getBitmapResource("/icon.png"); instead of logo.png it works.
Any other advice?
08-29-2011 11:11 AM
03-20-2012 04:01 PM
I have a solution that perharps is not too good but here we go. I had the same problem doing this from eclipse so i replace the file rapc.exe and rapc.jar in C:\Program Files (x86)\Research In Motion\BlackBerry JDE 4.6.1\bin with the files in my eclipse component 5.0 in my case C:\EclipseBlackberryJava\plugins\net.rim.ejde
So simply do this rename rapc.exe and rapc.jar from JDE 4.6.1 to rapc.exe.old and rapx.jar.old just in case don't work and copy rapc.exe and rapc.jar from net.rim.ejde.componentpack5.0.0_126.96.36.199\component
Let me know if someone else got this work like that too.