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
schumanns
Posts: 22
Registered: ‎01-12-2011
My Device: Not Specified

Resource File not Found

I'm working in Eclipse. I'm attempting to attach a file as a resource to my project.

 

To test everything out I built a small test project, dropped the file into the resource folder and built. In my code I was able to grab a handle to the file by calling this.getclass().getResourceAsStream("/test.bin")

 

This all worked fine so I tried moving the resource file into my larger project and using the same line to open it and its not found.  When I'm connected over debugger I see on the console.out the error 'FRIDG: could not find test.bin'

 

I also opened up the cod file in a hex editor and I can see that the resource is not in there, where as when I open my test project's COD i can see the resource file is in there.

 

What am I doing wrong? Why does it work in my test project but not in my real project?

 

thanks!

Contributor
christopherbecker
Posts: 28
Registered: ‎11-13-2012
My Device: none

Re: Resource File not Found

I'm also getting this issue, I created a new folder called lib in my project and pointed the resource to the jar file, called resty, however when running the app, a pop up appears and says,

 

Untitled-2.jpg

 

What is the correct way of doing this? I'm using the same technique as when doing a android app.

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Resource File not Found

please open an own thread for your question.

librbaries has to be marked as "export" or installed separately as a cod.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
christopherbecker
Posts: 28
Registered: ‎11-13-2012
My Device: none

Re: Resource File not Found

How would one mark a library as export, or install separately as a COD?
Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Resource File not Found

please open an own thread for your question
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter