您的位置:首页 > 编程语言 > Java开发

Java Compile Error: The code of method is exceeding the 65535 bytes limit

2010-02-23 16:24 701 查看
Issue:

When you compile your java class, you may got following error.

The code of method is exceeding the 65535 bytes limit

Reason:

According Java specification, one Java method size must be less than 65535 Bytes (64k). In most cases you encounter this error is because you want to init a big data or your java class is generated by some toolkit.

Solution:

One workaround is divide your big size method into some pieces of small size methods.

For example,

public static Float[][] getSMatrix()
{
initSMatrixPart1() ;
initSMatrixPart2() ;
initSMatrixPart3() ;
initSMatrixPart4() ;
initSMatrixPart5() ;

return sMatrix;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐