09-10-2008 07:17 AM
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.
09-10-2008 01:05 PM
09-11-2008 03:18 AM
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.
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.
09-11-2008 10:16 AM
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.