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
hussulinux
Posts: 13
Registered: ‎09-10-2008
My Device: Not Specified

.cod files

Hi,

 

I have a set of resource files which are of 8 MB. BB fails to compile it into a cod file.

 

Any help on how to?

 

I tried to put the resource files into another project. It compiled well. But now the resource files aren't accessible.

 

Please help.

 

Regards,

Hussain

Please use plain text.
Administrator
MSohm
Posts: 14,241
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: .cod files

8 MB is a lot of data to package with an application.  Are you packaging an 8 MB file or multiple files that add up to 8MB?  What is the largest file you are trying to import?  What version of the BlackBerry JDE are you using?  What is the error you are receiving?  Older versions of the BlackBerry JDE accept files up to a maximum size of 64kb.
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
Please use plain text.
New Developer
hussulinux
Posts: 13
Registered: ‎09-10-2008
My Device: Not Specified

Re: .cod files

Hi Mark,

 

Thanks for replying. 

 

I am having many files. Around 200 files. 

They are Images and Data files which I read through my program.

Largest file must be around 300KB-400KB. Not more than that.

 

My source code is 50KB only.

< I compiled source code only in another separate project, it compiles well and I can run it also, but it would give exceptions when trying to access the resources>

 

I couldn't compile and generate a cod file when I tried to pack resources in the same project too.

 

So I packed the resources in another project. Made that project as a Library. Added a Dummy.java so that it compiles as a JAR file.

Then I added this as a library dependency in my main project and compiled. I got an output of 10MB cod file.

 

I try to load this , I get memory out of stack. I increase the KVM and run it , it runs well, but I still get the same error as Resource not found.

 

 

--------------

 

I compiled an 8MB jar in Netbeans & WTK and it works fine on Handsets too. 

Further, I also tried rapc import jar and convert to COD, That fails with a NULL pointer Exception. This is really strange. I shudn't get this error.

 

-------------

 

I have been using ALL JDS from 4.1 to 4.5, All of them give same results.

 

-------------

 

To conclude:

1) I cannot compile the cod file itself when resources are added to same project

2) I can generate multiple cod files when spliting up resource files as library but when deployed and running, I cant access the resources.

 

 

Is there a system problem that 8MB of resources cannot be put in the BB?

 

I have seen applications running fine with 3-4 MB of .COD files, I don't quite know why this should make a difference in compiling itself.

 

Regards,

Hussain

Please use plain text.
Administrator
MSohm
Posts: 14,241
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: .cod files

What BlackBerry model and handheld software version are you testing with?  The maximum object size that could be handled in BlackBerry handheld software 4.1 and lower was 64kb. You could also be reaching the storage limit of the BlackBerry.  Older devices containg 8, 16 and 32 MB of flash storage.  The standard BlackBerry applications are also loaded into this memory, so the available space would be lower.

 

A possible work around for more recent BlackBerry handheld software versions and BlackBerry models with more memory would be to break your library into 2 libraries or store the data on the micro SD card of the BlackBerry instead of bundling it inside the 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
Please use plain text.