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