javac error “code too large”?

后端 未结 3 1618
情深已故
情深已故 2021-01-01 15:39

I have a unit test where I have statically defined a quite large byte array (over 8000 bytes) as the byte data of a file I don\'t want to read every time I run my unit test.

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-01 16:07

    You can load the byte array from a file in you @BeforeClass static method. This will make sure it's loaded only once for all your unit tests.

提交回复
热议问题