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

Error cod data section too large

by BlackBerry Development Advisor ‎02-16-2010 11:34 AM - edited ‎02-16-2010 11:45 AM (1,523 Views)

Summary


This article applies to the BlackBerry® Java™ Development Environment (JDE).


Problem


You receive the following error:

cod data section too large


Cause


A class definition contains too many string literals.


Resolution


Instead of splitting up the project into libraries, associate some of the strings with other class definitions.


Refer to the following examples:


Original definition


class S1 {
final static string FOO = "abcdefg";
}

class S2 {
final static string BAR = "hijklmn";
}

public class A {
String foo() {
return S2.FOO;
}

String bar() {
return S2.BAR;
}
}

 Modified definitions


class S1 {
     final static string FOO = "abcdefg";
}

class S2 {
     final static string BAR = "hijklmn";
}

public class A {
     String foo() {
          return S2.FOO;
     }

     String bar() {
          return S2.BAR;
     }
}

 


Thus, the string definitions are associated with separate classes, which the RAPC compiler (rapc.exe) can distribute amongst the siblings.

Contributors
Users Online
Currently online: 17 members 1,817 guests
Please welcome our newest community members: