Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
casebash
Posts: 18
Registered: ‎03-01-2010
My Device: None
Accepted Solution

Bundling resources with Blackberry

[ Edited ]

How do I get bundled resources with the BlackBerry Eclipse Plugin 1.1 Beta? I copied an image to "res/background.jpg" and made res a source folder (has that strange brown square divided into quadrants in the upper right hand corner). I tried loading it using Bitmap.getBitmapResource on the following paths:

 

  • res/background.jpg
  • /res/background.jpg
  • background.jpg
  • /background.jpg

Unfortunately, the image wasn't found (Illegal argument exception). I tried moving my image file into the src folder as per the advice here, but that didn't work either. I have opened up the .jar file and the background image is present at the root of the .jar file.

 

Links

Please use plain text.
Contributor
casebash
Posts: 18
Registered: ‎03-01-2010
My Device: None

Re: Bundling resources with Blackberry

Okay, I managed to load a .png file instead of a .jpg. I found an option to convert image files into .png, but this wasn't selected.

Please use plain text.
Contributor
casebash
Posts: 18
Registered: ‎03-01-2010
My Device: None

Re: Bundling resources with Blackberry

[ Edited ]

Okay, it randomly started working with .jpg. I really have no idea why - I had cleaned and rebuilt several times already before it started working.

Please use plain text.
Developer
JCarty
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: Bundling resources with Blackberry

Sounds like you have it under control. If you do, could you mark this as solved?

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Please use plain text.
Contributor
casebash
Posts: 18
Registered: ‎03-01-2010
My Device: None

Re: Bundling resources with Blackberry

Okay, will do. Just wasn't sure if I should mark it as solved when I didn't actually find out what the problem was. I suppose I can always open a new thread if it reoccurs.

Please use plain text.