Support - Error cod data section too large

Support - Error cod data section too large

Last Updated: 18 April 2006
Article Number: DB-00085

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

public class A {
     String foo() {
          return "abcdefg";
     }

     String bar() {
          return "hijklmn";
     }
}

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.

 

Keywords

data, section, too, large, strings

你可能感兴趣的:(UP,BlackBerry)