`
wuhua
  • 浏览: 2095627 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

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

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics