title: javac error "code too large"?
body: <p>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.</p>
  
  <pre><code>private static final byte[] FILE_DATA = new byte[] {
  12,-2,123,................
  }
  </code></pre>
  
  <p>This compiles fine within Eclipse, but when compiling via Ant script I get the following error:</p>
  
  <pre><code>[javac] C:\workspace\CCUnitTest\src\UnitTest.java:72: code too large
  [javac]     private static final byte[] FILE_DATA = new byte[] {
  [javac]                                 ^
  </code></pre>
  
  <p>Any ideas why and how I can avoid this?</p>
  
  <hr>
  
  <p><strong>Answer</strong>: Shimi's answer did the trick. I moved the byte array out to a separate class and it compiled fine. Thanks!</p>