Java “too many constants” JVM error

后端 未结 4 1914
广开言路
广开言路 2020-12-16 19:51

I\'m developing an application that generates and compiles classes at runtime. This will sometimes create huge amounts of generated code.

With one of our test cases,

4条回答
  •  长情又很酷
    2020-12-16 20:15

    http://en.wikipedia.org/wiki/Java_class_file#The_constant_pool

    The constant pool includes numbers, strings, method names, field names, class names, references to classes and methods...basically everything.

    There can be at most 65536 of them.

提交回复
热议问题