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
New Developer
Posts: 11
Registered: ‎11-22-2008
My Device: Not Specified

eclipse 3.4 + blackberry plugin, can't run midlets which use resources

Hi

 

I'm fairly new to blackberry development.

I've installed eclipse 3.4, blackberry plugin, everything works ok.

 

When I am doing a j2me development in Eclipse, I use "src"folder for the code and "res" folder for resource files.

Midlet runs ok in Eclipse IDE and Wireless Toolkit emulator.

 

Now I try the same thing under Eclipse 3.4 and Blackberry simulator.

The midlet runs ok to the part where resources are read.

For example: InputStream is = (new Object()).getClass().getResourceAsStream("/fonts.dat");

 

resource file is not found,    is = null...

 

 

Any idea how do I add the res folder to the  project?

 

 

BlackBerry Development Advisor
Posts: 15,078
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: eclipse 3.4 + blackberry plugin, can't run midlets which use resources

Please try adding your resource files under the src folder and re-build your application.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 11
Registered: ‎11-22-2008
My Device: Not Specified

Re: eclipse 3.4 + blackberry plugin, can't run midlets which use resources

I've done another thing, added the path /res/ to all calls where resources are needed.

It works perfectly.